-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add support for PrimeReact #2723
base: main
Are you sure you want to change the base?
Changes from all commits
58f8def
cab9fe1
85ee45a
05e3ae8
8a7eb51
94928fc
1f6391f
7b15168
7fc9356
8bcaedf
69efc3e
81074f3
143000a
32877f6
f3b0960
5467352
478a8d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ | |
"@rjsf/core": "^4.0.0", | ||
"@rjsf/fluent-ui": "^4.0.0", | ||
"@rjsf/material-ui": "^4.0.0", | ||
"@rjsf/primereact": "https://gitpkg.now.sh/dchenk/react-jsonschema-form/packages/primereact?2ade66860050bf49cfa51680a35802ce6afb63b9", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you change this to |
||
"@rjsf/semantic-ui": "^4.0.0", | ||
"ajv": "^6.7.0", | ||
"antd": "^4.3.5", | ||
|
@@ -59,11 +60,15 @@ | |
"less": "^3.11.3", | ||
"less-loader": "^5.0.0", | ||
"lodash": "^4.17.21", | ||
"primeflex": "^3.1.3", | ||
"primeicons": "^5.0.0", | ||
"primereact": "^7.2.0", | ||
"prop-types": "^15.7.2", | ||
"react-app-polyfill": "^1.0.4", | ||
"react-bootstrap": "^1.0.1", | ||
"react-frame-component": "^4.1.1", | ||
"react-is": "^16.9.0" | ||
"react-is": "^16.9.0", | ||
"react-transition-group": "^4.4.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.16.0", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import { Theme as SuiTheme } from "@rjsf/semantic-ui"; | |
import { Theme as AntdTheme } from "@rjsf/antd"; | ||
import { Theme as Bootstrap4Theme } from "@rjsf/bootstrap-4"; | ||
import { Theme as ChakraUITheme } from "@rjsf/chakra-ui"; | ||
import { Theme as PrimeReactTheme } from "@rjsf/primereact"; | ||
import Playground from "./app"; | ||
import { render } from "react-dom"; | ||
|
||
|
@@ -119,6 +120,15 @@ const themes = { | |
stylesheet: "", | ||
theme: ChakraUITheme, | ||
}, | ||
primereact: { | ||
stylesheets: [ | ||
"https://unpkg.com/[email protected]/primeicons.css", | ||
"https://unpkg.com/[email protected]/resources/themes/lara-light-indigo/theme.css", | ||
"https://unpkg.com/[email protected]/resources/primereact.min.css", | ||
"https://unpkg.com/[email protected]/primeflex.min.css", | ||
], | ||
theme: PrimeReactTheme, | ||
}, | ||
}; | ||
|
||
render(<Playground themes={themes} />, document.getElementById("app")); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.rts2_** |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<!-- PROJECT LOGO --> | ||
<br /> | ||
<p align="center"> | ||
<a href="https://github.com/rjsf-team/react-jsonschema-form"> | ||
<img src="./logo.svg" alt="Logo"> | ||
</a> | ||
|
||
<h3 align="center">@rjsf/primereact</h3> | ||
|
||
<p align="center"> | ||
PrimeReact theme, fields, and widgets for <a href="https://github.com/rjsf-team/react-jsonschema-form"><code>react-jsonschema-form</code></a>. | ||
<br /> | ||
<a href="https://react-jsonschema-form.readthedocs.io/en/latest/"><strong>Explore the docs »</strong></a> | ||
<br /> | ||
<br /> | ||
<a href="https://rjsf-team.github.io/react-jsonschema-form/">View Playground</a> | ||
· | ||
<a href="https://github.com/rjsf-team/react-jsonschema-form/issues">Report Bug</a> | ||
· | ||
<a href="https://github.com/rjsf-team/react-jsonschema-form/issues">Request Feature</a> | ||
</p> | ||
</p> | ||
|
||
<!-- TABLE OF CONTENTS --> | ||
|
||
## Table of Contents | ||
|
||
- [About The Project](#about-the-project) | ||
- [Getting Started](#getting-started) | ||
- [Prerequisites](#prerequisites) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [Contributing](#contributing) | ||
- [Contact](#contact) | ||
|
||
<!-- ABOUT THE PROJECT --> | ||
|
||
## About The Project | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is an extra blank line here that can be removed |
||
|
||
Exports `primereact` theme, fields and widgets for `react-jsonschema-form`. | ||
|
||
### Built With | ||
|
||
- [react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form) | ||
- [PrimeReact](https://www.primefaces.org/primereact/) | ||
- [Typescript](https://www.typescriptlang.org/) | ||
|
||
<!-- GETTING STARTED --> | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
- `primereact >= 7.2.0` | ||
- `@rjsf/core >= 4.0.0` | ||
|
||
```bash | ||
yarn add primereact @rjsf/core | ||
``` | ||
|
||
### Installation | ||
|
||
```bash | ||
yarn add @rjsf/primereact | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
import Form from '@rjsf/primereact'; | ||
``` | ||
|
||
or | ||
|
||
```js | ||
import { withTheme } from '@rjsf/core'; | ||
import { Theme as PrimeReactTheme } from '@rjsf/primereact'; | ||
|
||
const Form = withTheme(PrimeReactTheme); | ||
``` | ||
|
||
<!-- CONTRIBUTING --> | ||
|
||
## Contributing | ||
|
||
Read our [contributors' guide](https://react-jsonschema-form.readthedocs.io/en/latest/contributing/) to get started. | ||
|
||
<!-- CONTACT --> | ||
|
||
## Contact | ||
|
||
rjsf team: [https://github.com/orgs/rjsf-team/people](https://github.com/orgs/rjsf-team/people) | ||
|
||
GitHub repository: [https://github.com/rjsf-team/react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form) | ||
|
||
<!-- MARKDOWN LINKS & IMAGES --> | ||
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> | ||
|
||
[build-shield]: https://github.com/rjsf-team/react-jsonschema-form/workflows/CI/badge.svg | ||
[build-url]: https://github.com/rjsf-team/react-jsonschema-form/actions | ||
[contributors-shield]: https://img.shields.io/github/contributors/rjsf-team/react-jsonschema-form.svg | ||
[contributors-url]: https://github.com/rjsf-team/react-jsonschema-form/graphs/contributors | ||
[license-shield]: https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square | ||
[license-url]: https://choosealicense.com/licenses/apache-2.0/ | ||
[npm-shield]: https://img.shields.io/npm/v/@rjsf/primereact/latest.svg?style=flat-square | ||
[npm-url]: https://www.npmjs.com/package/@rjsf/primereact | ||
[npm-dl-shield]: https://img.shields.io/npm/dm/@rjsf/primereact.svg?style=flat-square | ||
[npm-dl-url]: https://www.npmjs.com/package/@rjsf/primereact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to bump this to
v4.2.0