Grommet 'background' property not working
See original GitHub issueI recently updated to Grommet 2.2.1 and now its not loading colors properly using the ‘background’ property.
Expected Behavior
import { Grommet, Box } from 'grommet';
import { grommet } from 'grommet/themes';
<Grommet theme={grommet}>
<Box background="brand">
test
</Box>
</Grommet>
This should yield a purple box
Actual Behavior
Throws an “Uncaught TypeError: Cannot read property ‘colors’ of undefined”
Also when importing ‘grommet/themes’, VS code says: [ts] Could not find a declaration file for module ‘grommet/themes’.
- Grommet version: ^2.2.1
- Browser Name and version: Chrome Version 70.0.3538.102
- Operating System and version (desktop or mobile): Mac Mojave, V10.14
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Show image as background in box in grommet - Stack Overflow
I have created a sandbox to showcase the problem. I have added a background.jpeg image locally which I am setting as the background...
Read more >the top level grommet container
Either a color identifier to use for the background color. For example: 'neutral-1'. Or, a 'url()' for an image. Dark is not needed...
Read more >Dark Mode Theming in Grommet: Theme color customization
Dark specifies the color Grommet uses when the element is on a dark background; light specifies the color for use on a light...
Read more >Using Grommet In React Applications - Smashing Magazine
In this tutorial, we're going to learn how to use Grommet as a UI library ... and theme properties which we'd need as...
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
https://github.com/grommet/grommet/releases/tag/v2.2.0 <-- we describe the update process here
yeah sorry for the bumpy road there.