Skip to content

Commit

Permalink
Add default Form export to @rjsf/antd (#2514)
Browse files Browse the repository at this point in the history
* Add default Form export to @rjsf/antd

Fixes #2100

* Update Array.test.js

* Update Array.test.js

* Update Form.test.js

* Update Object.test.js
  • Loading branch information
epicfaace authored Aug 12, 2021
1 parent 640cef4 commit 7897735
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
6 changes: 5 additions & 1 deletion packages/antd/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { utils } from '@rjsf/core';
import { utils, withTheme } from '@rjsf/core';

import DescriptionField from './fields/DescriptionField';
import TitleField from './fields/TitleField';
Expand Down Expand Up @@ -63,3 +63,7 @@ export const Theme = {
widgets: { ...widgets, ...Widgets },
ErrorList,
};

export const Form = withTheme(Theme);

export default Form;
5 changes: 1 addition & 4 deletions packages/antd/test/Array.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { withTheme } from '@rjsf/core';

import '../__mocks__/matchMedia.mock';
import { Theme } from '../src';
import Form from '../src';

const { describe, expect, test } = global;

const Form = withTheme(Theme);

describe("array fields", () => {
test("array", () => {
const schema = {
Expand Down
5 changes: 1 addition & 4 deletions packages/antd/test/Form.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { withTheme } from '@rjsf/core';

import '../__mocks__/matchMedia.mock';
import { Theme } from '../src';
import Form from '../src';

const { describe, expect, test } = global;

const Form = withTheme(Theme);

describe("single fields", () => {
describe("string field", () => {
test("regular", () => {
Expand Down
5 changes: 1 addition & 4 deletions packages/antd/test/Object.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import React from 'react';
import renderer from "react-test-renderer";
import { withTheme } from '@rjsf/core';

import '../__mocks__/matchMedia.mock';
import { Theme } from '../src';
import Form from '../src';

const { describe, expect, test } = global;

const Form = withTheme(Theme);

describe("object fields", () => {
test("object", () => {
const schema = {
Expand Down

0 comments on commit 7897735

Please sign in to comment.