Giter VIP home page Giter VIP logo

Comments (4)

nettofarah avatar nettofarah commented on May 22, 2024

I like this!
Still not sure how I feel about referring to colors by name though.
I know it is unlikely that we'd change our brand colors anytime soon, but I still enjoy using abstractions such as danger and primary.

I don't feel strongly about this though, just my 2 cents.

from evergreen.

jeroenransijn avatar jeroenransijn commented on May 22, 2024

Love the timely feedback, keep them coming 👍 @nettofarah thanks for the input!

How it is currently implemented in the React UI Library (internal Segment library) It is kind of hard to pull the trigger on changing what primary means. Blue buttons will become more used throughout our app in the future as a primary button, green will reserved a more severe primary actions such as creating new things. Primary is very much a relative term, in a Dialog the primary button might be blue, whereas in a creation form it might be green.

That being said, I think there is still place for a primary and danger abstraction, but in our application:

const DangerButton = props => <Button appearance='red' {...props} />
const PrimaryButton = props => <Button appearance='green' {...props} />

// Or something like
const SemanticColors = {
   primary: colors.green['500'],
   danger: colors.red['500']
}

from evergreen.

nettofarah avatar nettofarah commented on May 22, 2024

Sounds good to me!
I'm sold :)

from evergreen.

jeroenransijn avatar jeroenransijn commented on May 22, 2024

Implemented, see #13.

from evergreen.

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.