-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IDEA] "appearance" prop #71
Comments
during implementation you get the list of what is available to be entered in the props vs the somewhat generic and generalized strings that show up in |
I think brevity and consistency go a long way. A single prop might be too extreme as it introduces a lot of logic into a single entry point. The only single prop that should do that is, re: Here's a list of prop type standards that went a long way for making reactstrap simple to use because I think it followed a basic mental model of how the props should work: reactstrap/reactstrap#2
The only big feedback I had was that Lastly, I think |
Thank you for your feedback! You've both brought up good points. TypeScript@vlutton: I'm just starting to learn more about TypeScript, so this is useful information. Size vs Variant@eddywashere: SizeCSS styles that change the size modify both vertical and horizontal spacing within a button. VariantIn addition to colors, variant styles modify horizontal spacing within a button (retaining size/height). I agree that the term "variant" probably isn't the best prop name, but I'm not sure What about something like Predicate PropertiesI like the idea of using Summary
|
FYI: I just realized that it would be additional work to use ExampleSay we had a button that can be disabled. Vanilla
|
Yes, “when possible”. For the disabled example that’s exactly what reactstrap does. It was easier to have a whitelist of html attributes and their react variants (for -> htmlFor). It’s weird with web components since they can be anything. Which is why I mentioned that web components are not just basic html/css. It’s like a separate thing that you have to keep in mind. Another layer. It’s an add on to dom apis but the bottom line is it’s a thing in and of itself. ^ Just clarifying the position I had because I had this context in mind and it was difficult to communicate until you’re in the thick of it. |
Issue dated. Pursing updated solution. |
Currently Buttons accept two separate props to modify it's size (small, medium, large) and type (primary, secondary, tertiary). Evergreen buttons use an
appearance
prop to tweak visual styles. So I started to wonder if it would be possible to use a single prop across HelixReact components to modify appearance without the need to directly apply CSS classes.Current
Concept
medium
andsecondary
are ignored (default size and type)Pros and Cons
PROS
appearance
prop easily understandableCONS
appearance
prop could be something shorter to typeThe text was updated successfully, but these errors were encountered: