@overlayed-app/contributes-form
v1.2.1
Published
Form for contributes providers
Downloads
6
Readme
contributes-form
Form for contributes providers ✔️
Why
We need a configuration component that works with contributes settings. This is that component.
How
npm i @overlayed-app/contributes-form
Then in code (if jsx
):
const ContributesForm = require('@overlayed-app/contributes-form')
// use it as a react component
<ContributesForm sources={['test/package.json']} />
or (if tsx
):
import ContributesForm from '@overlayed-app/contributes-form'
// use it as a react component
<ContributesForm sources={['test/package.json']} />
API
The default module exports the react component. The options are as follows:
sources
- an array of paths to json files containing contributes objectsrawSources
- an optional array of contributes object literalsdata
- an optional data object, containing existing setting datacompleted
- an optional callback that's given the changed setting data
Uses mozilla-services/react-jsonschema-form under the hood.
Contributing
- To build
npm run build
. - To publish
npm run publish
. - To test
npm test
.
Authors
Ben Greenier - Initial work - bengreenier
License
Contributes is licensed under the MIT License - Click here for details