Skip to content

Default theming example #70

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

Closed
xli1000 opened this issue Jun 23, 2017 · 2 comments
Closed

Default theming example #70

xli1000 opened this issue Jun 23, 2017 · 2 comments

Comments

@xli1000
Copy link

xli1000 commented Jun 23, 2017

The README.md shows this example where a theme is passed in as a prop to override the default theme:

import style from './Section.css';
[...]
<SuccessButton theme={style.button}>Yai!</SuccessButton>

But this didn't work for me--since style is an object like { button: 'button-1jq92' }, style.button is a string and can't be used to override the default theme.

I had to do something like this:

<SuccessButton theme={ {button: style.button} }>Yai!</SuccessButton>

or just theme={style}.

Am I missing something, or is this a mistake in that example?

@raveclassic
Copy link
Contributor

You are correct, it's a mistake in the docs. theme prop always accepts an object.
Related: #31

@xli1000
Copy link
Author

xli1000 commented Jun 26, 2017

I see that a PR has already been submitted to correct this: #69.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants