Skip to content

Commit a815992

Browse files
committed
Change default properties from null to undefined (#662)
1 parent 5f84fb4 commit a815992

File tree

31 files changed

+69
-69
lines changed

31 files changed

+69
-69
lines changed

src/components/Alert/Alert.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ export const Alert = ({
5757

5858
Alert.defaultProps = {
5959
color: 'note',
60-
icon: null,
60+
icon: undefined,
6161
id: undefined,
62-
onClose: null,
62+
onClose: undefined,
6363
};
6464

6565
Alert.propTypes = {

src/components/Button/Button.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,18 @@ export const Button = React.forwardRef((props, ref) => {
101101
});
102102

103103
Button.defaultProps = {
104-
afterLabel: null,
105-
beforeLabel: null,
104+
afterLabel: undefined,
105+
beforeLabel: undefined,
106106
block: false,
107107
color: 'primary',
108108
disabled: false,
109-
endCorner: null,
110-
feedbackIcon: null,
109+
endCorner: undefined,
110+
feedbackIcon: undefined,
111111
id: undefined,
112112
labelVisibility: 'xs',
113113
priority: 'filled',
114114
size: 'medium',
115-
startCorner: null,
115+
startCorner: undefined,
116116
type: 'button',
117117
};
118118

src/components/ButtonGroup/ButtonGroup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const ButtonGroup = ({
4848

4949
ButtonGroup.defaultProps = {
5050
block: false,
51-
children: null,
51+
children: undefined,
5252
disabled: false,
5353
priority: 'filled',
5454
size: 'medium',

src/components/Card/CardFooter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const CardFooter = ({
2424
};
2525

2626
CardFooter.defaultProps = {
27-
children: null,
27+
children: undefined,
2828
};
2929

3030
CardFooter.propTypes = {

src/components/CheckboxField/CheckboxField.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ export const CheckboxField = React.forwardRef((props, ref) => {
7979

8080
CheckboxField.defaultProps = {
8181
disabled: false,
82-
helpText: null,
82+
helpText: undefined,
8383
id: undefined,
8484
isLabelVisible: true,
8585
labelPosition: 'after',
8686
renderAsRequired: false,
8787
required: false,
88-
validationState: null,
89-
validationText: null,
88+
validationState: undefined,
89+
validationText: undefined,
9090
};
9191

9292
CheckboxField.propTypes = {

src/components/FileInputField/FileInputField.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,14 @@ export const FileInputField = React.forwardRef((props, ref) => {
247247
FileInputField.defaultProps = {
248248
disabled: false,
249249
fullWidth: false,
250-
helpText: null,
250+
helpText: undefined,
251251
isLabelVisible: true,
252252
layout: 'vertical',
253253
multiple: false,
254254
required: false,
255255
size: 'medium',
256-
validationState: null,
257-
validationText: null,
256+
validationState: undefined,
257+
validationText: undefined,
258258
};
259259

260260
FileInputField.propTypes = {

src/components/FormLayout/FormLayout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const FormLayout = ({
6868

6969
FormLayout.defaultProps = {
7070
autoWidth: false,
71-
children: null,
71+
children: undefined,
7272
fieldLayout: 'vertical',
7373
labelWidth: 'default',
7474
};

src/components/FormLayout/FormLayoutCustomField.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ export const FormLayoutCustomField = ({
8080
};
8181

8282
FormLayoutCustomField.defaultProps = {
83-
children: null,
83+
children: undefined,
8484
disabled: false,
8585
fullWidth: false,
8686
id: undefined,
87-
innerFieldSize: null,
88-
label: null,
87+
innerFieldSize: undefined,
88+
label: undefined,
8989
labelForId: undefined,
9090
required: false,
91-
validationState: null,
91+
validationState: undefined,
9292
};
9393

9494
FormLayoutCustomField.propTypes = {

src/components/Grid/Grid.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Grid.defaultProps = {
5454
alignContent: undefined,
5555
alignItems: undefined,
5656
autoFlow: undefined,
57-
children: null,
57+
children: undefined,
5858
columnGap: 4,
5959
columns: '1fr',
6060
justifyContent: undefined,

src/components/Grid/GridSpan.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const GridSpan = ({
3535
/* eslint-disable sort-keys */
3636

3737
GridSpan.defaultProps = {
38-
children: null,
38+
children: undefined,
3939
columns: 1,
4040
rows: 1,
4141
tag: 'div',

0 commit comments

Comments
 (0)