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

Importing react-jsonschema-form-theme-bs4 fails #1

Open
ivarprudnikov opened this issue Jun 17, 2019 · 1 comment · May be fixed by #2
Open

Importing react-jsonschema-form-theme-bs4 fails #1

ivarprudnikov opened this issue Jun 17, 2019 · 1 comment · May be fixed by #2

Comments

@ivarprudnikov
Copy link

I think due to broken definition in package.json the import does not work, i.e.:

import Bootstrap4Theme from 'react-jsonschema-form-theme-bs4'

as it tries to resolve a "main": "index.js" as can be seen in docs

Suggest replacing "main": "index.js" with "main": "src/index.js"

@ivarprudnikov
Copy link
Author

To my mind fix for this is important as import is mentioned in react-jsonschema-form docs. https://react-jsonschema-form.readthedocs.io/en/latest/theme-customization/#usage

import React, { Component } from 'react';
import { withTheme } from 'react-jsonschema-form';
import Bootstrap4Theme from 'react-jsonschema-form-theme-bs4';

const ThemedForm = withTheme(Bootstrap4Theme); 
class Demo extends Component {
    render() {
        return <ThemedForm schema={{...}} uiSchema={{...}} />
    }
}

@kennethormandy kennethormandy linked a pull request Oct 1, 2019 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant