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

Add default Form export to @rjsf/antd #2514

Merged
merged 5 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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