GithubHelp home page GithubHelp logo

Comments (5)

m8r1x avatar m8r1x commented on May 17, 2024 1

I would like to take this but I'm having a bit of trouble understanding what exactly is required.
Do you want the button props to resemble alert props entirely or are you looking to change how the button accepts theme props like so:

// accept config object
const buttonTheme = {
  primary: true,
  outline: true
}
<Button theme={buttonTheme} />

or maybe even removing the boolean types all together to have

// accept string only
<Button theme='info' />
<Button theme='outline-secondary' />

// accept string or array of string
<Button theme='danger' />
<Button theme=['primary', 'outline'] />

from tabler-react.

jonthomp avatar jonthomp commented on May 17, 2024 1

@AaronCoplan they're both appearance only - block turns it into a CSS display: block and link removes background color but keeps everything else buttony, so you would most likely be using these on top of the color/outline option rather than stand alone

from tabler-react.

AaronCoplan avatar AaronCoplan commented on May 17, 2024

I am a fan of the suggestion with accepting string only i.e.

// accept string only
<Button theme='info' />
<Button theme='outline-secondary' />

I think we could define a type for this that only accepts certain values similar to how I've done in Alert

from tabler-react.

jonthomp avatar jonthomp commented on May 17, 2024

@AaronCoplan should block and link should be seperate? They add the separate classes btn-block and btn-list on top of the btn-primary, btn-primary-outline etc so work slightly differently

from tabler-react.

AaronCoplan avatar AaronCoplan commented on May 17, 2024

@jonthomp That's a good question - do they change the desired functionality or just the appearance? Maybe we could build a base button then add specific ones similar to how you've done with Header and H1 ... H5?

from tabler-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.