-
Notifications
You must be signed in to change notification settings - Fork 1k
added storybook example of themecontext.consumer #3612
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
added storybook example of themecontext.consumer #3612
Conversation
<div style={{ backgroundColor: theme.global.colors['neutral-3'] }}> | ||
<p style={{ color: theme.global.colors['light-1'] }}> | ||
{' '} | ||
This is not a grommet component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a grommet component | |
This component is leveraging the grommet theme capabilities although it is not a grommet component |
what do you think?
</Grommet> | ||
); | ||
|
||
storiesOf('Theme', module).add('Theme Context', () => <CustomDefaultProps />); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storiesOf('Theme', module).add('Theme Context', () => <CustomDefaultProps />); | |
storiesOf('Theme', module).add('External components', () => <CustomDefaultProps />); |
what do you think?
import { grommet } from 'grommet/themes'; | ||
import { Box, Text, ThemeContext, Grommet } from 'grommet'; | ||
|
||
const CustomDefaultProps = () => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component name doesn't make sense to me.
ExternalComponentWithTheme
would make sense to me, feel free to make other suggestions.
changed name of component to ExternalComponentWithTheme
What does this PR do?
Adds example for using themecontext.consumer to add theme properties to non grommet components
Where should the reviewer start?
src/js/contexts/ThemeContext/theme-context.stories.js