Skip to content

Commit 6af02d5

Browse files
committed
fix(suir): fix typos in prop types
1 parent f10389d commit 6af02d5

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

packages/suir-component-mapper/src/files/dual-list-select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const DualList = ({
162162
OptionProps,
163163
LabelProps: { className: labelClassName, error: labelError, ...LabelProps },
164164
ToolbarProps,
165-
ButtonGridProps: { className: buttonGridClassName },
165+
ButtonGridProps: { className: buttonGridClassName, ...ButtonGridProps },
166166
RightButtonProps,
167167
DoubleRightButtonProps,
168168
LeftButtonProps,
@@ -224,7 +224,7 @@ const DualList = ({
224224
</GridColumn>
225225
</Grid>
226226
</GridColumn>
227-
<GridColumn className={clsx(classes.dualListButtons, buttonGridClassName)} mobile={16} tablet={16} computer={2}>
227+
<GridColumn className={clsx(classes.dualListButtons, buttonGridClassName)} {...ButtonGridProps} mobile={16} tablet={16} computer={2}>
228228
<Grid>
229229
<GridColumn tablet={16} mobile={4}>
230230
<Button

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const ArrayItem = ({
4747
removeLabel,
4848
RemoveButtonProps,
4949
ArrayItemGridProps: { className: arrayItemClassName, ...ArrayItemGridProps },
50-
ArrayItemFieldsGrid
50+
ArrayItemFieldsGridProps
5151
}) => {
5252
const { renderForm } = useFormApi();
5353
const classes = useStyles();
@@ -59,7 +59,7 @@ const ArrayItem = ({
5959

6060
return (
6161
<div className={clsx(classes.arrayItem, arrayItemClassName)} {...ArrayItemGridProps}>
62-
<div {...ArrayItemFieldsGrid}>{renderForm([editedFields])}</div>
62+
<div {...ArrayItemFieldsGridProps}>{renderForm([editedFields])}</div>
6363
<div>
6464
<Button
6565
icon="remove"
@@ -86,13 +86,13 @@ ArrayItem.propTypes = {
8686
removeLabel: PropTypes.node.isRequired,
8787
RemoveButtonProps: PropTypes.object,
8888
ArrayItemGridProps: PropTypes.object,
89-
ArrayItemFieldsGrid: PropTypes.object
89+
ArrayItemFieldsGridProps: PropTypes.object
9090
};
9191

9292
ArrayItem.defaultProps = {
9393
RemoveButtonProps: {},
9494
ArrayItemGridProps: {},
95-
ArrayItemFieldsGrid: {}
95+
ArrayItemFieldsGridProps: {}
9696
};
9797

9898
const defaultButtonLabels = {
@@ -156,7 +156,7 @@ const DynamicArray = ({ ...props }) => {
156156
NoItemsProps: { className: noItemsClassname, ...NoItemsProps },
157157
RemoveButtonProps,
158158
ArrayItemGridProps,
159-
ArrayItemFieldsGrid,
159+
ArrayItemFieldsGridProps,
160160
...rest
161161
} = useFieldApi(props);
162162
const [state, dispatch] = useReducer(reducer, initialState);
@@ -272,7 +272,7 @@ const DynamicArray = ({ ...props }) => {
272272
remove={removeWrapper}
273273
RemoveButtonProps={RemoveButtonProps}
274274
ArrayItemGridProps={ArrayItemGridProps}
275-
ArrayItemFieldsGrid={ArrayItemFieldsGrid}
275+
ArrayItemFieldsGridProps={ArrayItemFieldsGridProps}
276276
/>
277277
))
278278
)}
@@ -311,7 +311,7 @@ DynamicArray.propTypes = {
311311
NoItemsProps: PropTypes.object,
312312
RemoveButtonProps: PropTypes.object,
313313
ArrayItemGridProps: PropTypes.object,
314-
ArrayItemFieldsGrid: PropTypes.object
314+
ArrayItemFieldsGridProps: PropTypes.object
315315
};
316316

317317
DynamicArray.defaultProps = {
@@ -330,7 +330,7 @@ DynamicArray.defaultProps = {
330330
NoItemsProps: {},
331331
RemoveButtonProps: {},
332332
ArrayItemGridProps: {},
333-
ArrayItemFieldsGrid: {}
333+
ArrayItemFieldsGridProps: {}
334334
};
335335

336336
export default DynamicArray;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const Radio = ({ name, ...props }) => {
4242
validateOnMount,
4343
FormFieldGridProps,
4444
FormFieldProps,
45-
HelpertextProps,
45+
HelperTextProps,
4646
...rest
4747
} = useFieldApi({
4848
...props,
@@ -51,7 +51,7 @@ const Radio = ({ name, ...props }) => {
5151
});
5252
const invalid = validationError(meta, validateOnMount);
5353
return (
54-
<FormFieldGrid helperText={helperText} HelpertextProps={HelpertextProps} {...FormFieldGridProps}>
54+
<FormFieldGrid helperText={helperText} HelperTextProps={HelperTextProps} {...FormFieldGridProps}>
5555
<FormField {...FormFieldProps} disabled={isDisabled} required={isRequired} error={invalid && { content: meta.error }} label={label} />
5656
{options.map((option) => (
5757
<RadioOption key={option.value} name={name} option={option} isDisabled={isDisabled} isReadOnly={isReadOnly} {...rest} />
@@ -75,14 +75,14 @@ Radio.propTypes = {
7575
/** Sub components customization API */
7676
FormFieldGridProps: PropTypes.object,
7777
FormFieldProps: PropTypes.object,
78-
HelpertextProps: PropTypes.object
78+
HelperTextProps: PropTypes.object
7979
};
8080

8181
Radio.defaultProps = {
8282
options: [],
8383
FormFieldGridProps: {},
8484
FormFieldProps: {},
85-
HelpertextProps: {}
85+
HelperTextProps: {}
8686
};
8787

8888
export default Radio;

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ TabContent.propTypes = {
1212
formOptions: PropTypes.shape({ renderForm: PropTypes.func.isRequired }).isRequired
1313
};
1414

15-
const FormTabs = ({ fields, TabProps, TabPaneProps, TabContentProps }) => {
15+
const FormTabs = ({ fields, TabProps, TabPaneProps }) => {
1616
const formOptions = useFormApi();
1717

1818
const panes = fields.map((field, index) => ({
1919
menuItem: field.title,
2020
pane: (
2121
<TabPane {...TabPaneProps} key={index}>
22-
<TabContent {...TabContentProps} {...field} formOptions={formOptions} />
22+
<TabContent {...field} formOptions={formOptions} />
2323
</TabPane>
2424
)
2525
}));
@@ -29,14 +29,12 @@ const FormTabs = ({ fields, TabProps, TabPaneProps, TabContentProps }) => {
2929
FormTabs.propTypes = {
3030
fields: PropTypes.array.isRequired,
3131
TabProps: PropTypes.object,
32-
TabPaneProps: PropTypes.object,
33-
TabContentProps: PropTypes.object
32+
TabPaneProps: PropTypes.object
3433
};
3534

3635
FormTabs.defaultProps = {
3736
TabProps: {},
38-
TabPaneProps: {},
39-
TabContentProps: {}
37+
TabPaneProps: {}
4038
};
4139

4240
export default FormTabs;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ WizardInternal.propTypes = {
5656
)
5757
};
5858

59-
const MuiWizard = (props) => <Wizard Wizard={WizardInternal} {...props} />;
59+
const SuirWizard = (props) => <Wizard Wizard={WizardInternal} {...props} />;
6060

61-
export default MuiWizard;
61+
export default SuirWizard;

0 commit comments

Comments
 (0)