Skip to content

Commit fcad368

Browse files
authored
Merge pull request #566 from rvsia/fixSuirProps
Fix suir props
2 parents c37d044 + dfaf610 commit fcad368

File tree

6 files changed

+2
-27
lines changed

6 files changed

+2
-27
lines changed

packages/suir-component-mapper/src/files/checkbox.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { UseFieldApiComponentConfig, AnyObject } from "@data-driven-forms/react-form-renderer";
2-
import { CheckboxProps as SuirCheckboxProps, FormFieldProps, HeaderProps } from 'semantic-ui-react';
2+
import { CheckboxProps as SuirCheckboxProps } from 'semantic-ui-react';
33
import { ReactNode } from "react";
4-
import { FormFieldGridProps, HelperTextProps } from "./form-field-grid";
54
import { CommonFieldProps } from "./common-field-props";
65

76
export interface CheckboxOption extends AnyObject {
@@ -11,10 +10,6 @@ export interface CheckboxOption extends AnyObject {
1110

1211
interface InternalCheckboxProps extends SuirCheckboxProps {
1312
options?: CheckboxOption[];
14-
/** Sub components customization API */
15-
FormFieldProps?: FormFieldProps;
16-
HeaderProps?: HeaderProps;
17-
OptionsListProps?: React.HTMLProps<HTMLDivElement>;
1813
}
1914

2015
export type CheckboxProps = InternalCheckboxProps & CommonFieldProps & UseFieldApiComponentConfig;

packages/suir-component-mapper/src/files/checkbox.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import { FormCheckbox } from 'semantic-ui-react';
4-
import { meta, input } from '@data-driven-forms/common/src/prop-types-templates';
54

65
import FormFieldGrid from '../common/form-field-grid';
76
import { validationError } from '../common/helpers';
@@ -51,8 +50,6 @@ export const SingleCheckbox = (props) => {
5150
};
5251

5352
SingleCheckbox.propTypes = {
54-
input,
55-
meta,
5653
isReadOnly: PropTypes.bool,
5754
isDisabled: PropTypes.bool,
5855
isRequired: PropTypes.bool,
@@ -71,17 +68,11 @@ Checkbox.propTypes = {
7168
options: PropTypes.array,
7269
/** Sub components customization API */
7370
FormFieldGridProps: PropTypes.object,
74-
FormFieldProps: PropTypes.object,
75-
HeaderProps: PropTypes.object,
76-
OptionsListProps: PropTypes.object,
7771
HelperTextProps: PropTypes.object
7872
};
7973

8074
Checkbox.defaultProps = {
8175
FormFieldGridProps: {},
82-
FormFieldProps: {},
83-
HeaderProps: {},
84-
OptionsListProps: {},
8576
HelperTextProps: {}
8677
};
8778

packages/suir-component-mapper/src/files/date-picker.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
33

44
import FormFieldGrid from '../common/form-field-grid';
55
import { validationError } from '../common/helpers';
6-
import { meta, input } from '@data-driven-forms/common/src/prop-types-templates';
76
import { useFieldApi } from '@data-driven-forms/react-form-renderer';
87
import FormField from '../common/form-field';
98

@@ -44,8 +43,6 @@ const DatePicker = (props) => {
4443
};
4544

4645
DatePicker.propTypes = {
47-
input,
48-
meta,
4946
isReadOnly: PropTypes.bool,
5047
isDisabled: PropTypes.bool,
5148
placeholder: PropTypes.node,

packages/suir-component-mapper/src/files/switch.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { meta, input } from '@data-driven-forms/common/src/prop-types-templates';
43
import { FormCheckbox } from 'semantic-ui-react';
54
import { useFieldApi } from '@data-driven-forms/react-form-renderer';
65
import FormFieldGrid from '../common/form-field-grid';
@@ -40,6 +39,7 @@ export const Switch = (props) => {
4039
className,
4140
FormFieldGridProps,
4241
HelpertextProps,
42+
type,
4343
...rest
4444
} = useFieldApi({
4545
...props,
@@ -73,8 +73,6 @@ export const Switch = (props) => {
7373
};
7474

7575
Switch.propTypes = {
76-
input,
77-
meta,
7876
isReadOnly: PropTypes.bool,
7977
isDisabled: PropTypes.bool,
8078
isRequired: PropTypes.bool,

packages/suir-component-mapper/src/files/text-field.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
33
import { Input } from 'semantic-ui-react';
44

55
import { validationError } from '../common/helpers';
6-
import { meta, input } from '@data-driven-forms/common/src/prop-types-templates';
76
import { useFieldApi } from '@data-driven-forms/react-form-renderer';
87
import FormFieldGrid from '../common/form-field-grid';
98
import FormField from '../common/form-field';
@@ -47,8 +46,6 @@ const TextField = (props) => {
4746
};
4847

4948
TextField.propTypes = {
50-
input,
51-
meta,
5249
isReadOnly: PropTypes.bool,
5350
isDisabled: PropTypes.bool,
5451
placeholder: PropTypes.node,

packages/suir-component-mapper/src/files/time-picker.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
33

44
import FormFieldGrid from '../common/form-field-grid';
55
import { validationError } from '../common/helpers';
6-
import { meta, input } from '@data-driven-forms/common/src/prop-types-templates';
76
import { useFieldApi } from '@data-driven-forms/react-form-renderer';
87
import FormField from '../common/form-field';
98

@@ -34,8 +33,6 @@ const TimePicker = (props) => {
3433
};
3534

3635
TimePicker.propTypes = {
37-
input,
38-
meta,
3936
isReadOnly: PropTypes.bool,
4037
isDisabled: PropTypes.bool,
4138
placeholder: PropTypes.node,

0 commit comments

Comments
 (0)