Accessing style properties of a specific grommet component for use in a custom component in a tidy style object
See original GitHub issueBased on the documentation on Accessing theme data outside Grommet Components I’d expect to be able to access style properties from defaultProps.textInput
to use in my own input component like so,
<input style={{...defaultProps.textInput}}input>
Instead defaultProps.textInput
is just an empty object which serves no utility.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
How do I custom style Grommet components? #3049 - GitHub
I'm just clear on how to add custom styles to all components and one ... I do use the Grommet component to pass...
Read more >6 Tips for Styling with Grommet - Atomic Spin
6 Tips for Styling with Grommet · Don't declare the entire theme. · Prioritize the Grommet API, not custom CSS or inline styles....
Read more >the top level grommet container
Custom messages for grommet components. Use this property to define messages or a function to get localized messages for any grommet children components....
Read more >Using Custom Properties to Modify Components | CSS-Tricks
All we'd have to do is edit a single variable that's in the :root , plus we can then edit those custom props...
Read more >Using Grommet In React Applications - Smashing Magazine
Styles can be added to a Grommet component as objects like we did to the Button or they can be styled using styled-components....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, i can do that.
Thanks @IanKBovard, I think this is the solution I am looking for. After I sent my last comment I found the theme props in the documentation. I think I can figure it out from the two links you’ve provided.