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

Styling component-specific themes #58

Open
adrianmcli opened this issue Sep 6, 2017 · 2 comments
Open

Styling component-specific themes #58

adrianmcli opened this issue Sep 6, 2017 · 2 comments

Comments

@adrianmcli
Copy link

adrianmcli commented Sep 6, 2017

So I've got a ThemeProvider component that works as expected, but what if I want a specific theme for a specific component? Something like this:

import React from "react";

import ThemeProvider from "react-toolbox/lib/ThemeProvider";
import Button from "react-toolbox/lib/button/Button";

import theme from "../static/theme";
import btnTheme from "./btnTheme";

export default () => (
    <ThemeProvider theme={theme}>
      <Button theme={btnTheme} raised primary>Hello</Button>
    </ThemeProvider>
);

Basically, I want btnTheme to work as expected (i.e. as if I have CSS Modules enabled).

I'm using Next.js (not reflected above) so it is hard to have CSS modules, but I want to be able to have full control of individual components.

I just want to know if this is possible, or maybe it's just a feature that is incompatible with Next.js.

@rntorm
Copy link

rntorm commented Sep 17, 2017

+1
I am using create-react-app and would like to know the same thing. If it is only possible to change style in the package.json, its rather useless.

@blainegarrett
Copy link

I've asked this on stackoverflow as well. No responses yet.
https://stackoverflow.com/questions/45679092/how-to-apply-theme-in-react-toolbox-2-when-using-create-react-app

Unrelated: Anyone know if there is still a discord channel for react-toolbox? I found a PR where the link was removed from the docs, but not mention of why or if there is a new channel.

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