react-jsonschema icon indicating copy to clipboard operation
react-jsonschema copied to clipboard

add themes support

Open usulpro opened this issue 9 years ago • 3 comments

Hello I like this project! does it support themes customization? I'm developing storybook addon for material-ui It's a project for themes development. if they are compatible, I would insert your form as an example in my live demo page. What do you think?

usulpro avatar Oct 19 '16 15:10 usulpro

Hi @UsulPro, I'm actually looking to decouple material-ui from this project so it is not locked into a specific interface/design. I do plan on creating a simple theming API for this project in the future though.

vutran avatar Oct 19 '16 15:10 vutran

Do you want to keep similar structure in your api to be possible to use it inside 'ThemeProvider' or something like this? Just let me know does this make sense. I would contribute!

usulpro avatar Oct 19 '16 16:10 usulpro

@UsulPro I like the idea of exposing an API that is compatible with MuiThemeProvider. I believe they are utilizing getChildContext() so we can definitely replicate MuiThemeProvider internally.

My were to actually have an API very similar to that concept.

_Concept_

import theme from 'my-custom-theme';
import Form from 'react-jsonschema';

<ThemeProvider theme={theme}><Form schema={schema} /></ThemeProvider>

This will allow us to have my-custom-theme as a standalone npm module and allow the OSS community to build custom theme modules.

If you'd like to contribute, please do! I'm happy to see what ideas you have.

vutran avatar Oct 19 '16 17:10 vutran