Skip to content
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

Documentation w.r.t. Theming and Raw Components #654

Closed
landabaso opened this issue Jul 19, 2016 · 3 comments
Closed

Documentation w.r.t. Theming and Raw Components #654

landabaso opened this issue Jul 19, 2016 · 3 comments

Comments

@landabaso
Copy link
Contributor

landabaso commented Jul 19, 2016

From the docs here, section theming:

Then, when you use a button you can inject the appropriated theme:

import { Button } from 'react-toolbox/lib/button/Button';
import buttonTheme from './theme/button.scss';

const ThemedButton = (props) => (
  <Button theme={buttonTheme}  {...props} />
);

export default ThemedButton;

With this technique you have to create wrappers for every component and this is not cool at all... but don't worry, we can provide the theme via context to avoid this.

Perhaps it should be:

import Button from 'react-toolbox/lib/button/Button';
(without the Brackets - { } -)

Otherwise the themes passed through the context are not applied (see the code here).

Is that correct?

@javivelasco
Copy link
Member

Totally! Wanna PR?

landabaso added a commit to landabaso/react-toolbox that referenced this issue Jul 20, 2016
Incorrect import of a Raw Component w.r.t theming.
See react-toolbox#654
@landabaso
Copy link
Contributor Author

Should I close it or wait until http://react-toolbox.com/#/install is compiled with the changes?

@javivelasco
Copy link
Member

Better close, I'm releasing between today and tomorrow!

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

2 participants