Skip to content

Commit 31fa9b7

Browse files
committed
fixup! fixup! transform RUI to typescript (#394)
1 parent 3d5dfc7 commit 31fa9b7

File tree

19 files changed

+30
-30
lines changed

19 files changed

+30
-30
lines changed

src/components/Alert/Alert.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { AlertProps } from './Alert.types';
1010
export const Alert: React.FunctionComponent<AlertProps> = ({
1111
children,
1212
color = 'note',
13-
icon = null,
13+
icon,
1414
id,
15-
onClose = null,
15+
onClose,
1616
...restProps
1717
}) => {
1818
const translations = useContext(TranslationsContext);

src/components/Button/Button.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ import styles from './Button.module.scss';
1414

1515
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
1616
const {
17-
afterLabel = null,
18-
beforeLabel = null,
17+
afterLabel,
18+
beforeLabel,
1919
block = false,
2020
disabled = false,
21-
endCorner = null,
22-
feedbackIcon = null,
21+
endCorner,
22+
feedbackIcon,
2323
id,
2424
label,
2525
labelVisibility = 'xs',
2626
priority = 'filled',
2727
size = 'medium',
28-
startCorner = null,
28+
startCorner,
2929
color = 'primary',
3030
...restProps
3131
} = props;

src/components/ButtonGroup/ButtonGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import styles from './ButtonGroup.module.scss';
1717
export const ButtonGroup: React.FunctionComponent<ButtonGroupProps> = ({
1818
block = defaultValues.block,
1919
disabled = defaultValues.disabled,
20-
children = null,
20+
children,
2121
priority = defaultValues.priority,
2222
size = defaultValues.size,
2323
...restProps

src/components/CheckboxField/CheckboxField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import styles from './CheckboxField.module.scss';
1010
export const CheckboxField = React.forwardRef<HTMLInputElement, CheckboxFieldProps>((props, ref) => {
1111
const {
1212
disabled = false,
13-
helpText = null,
13+
helpText,
1414
id,
1515
isLabelVisible = true,
1616
label,
1717
labelPosition = 'after',
1818
renderAsRequired = false,
1919
required = false,
2020
validationState,
21-
validationText = null,
21+
validationText,
2222
...restProps
2323
} = props;
2424
const context = useContext(FormLayoutContext);

src/components/FileInputField/FileInputField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ export const FileInputField = React.forwardRef<HTMLInputElement, FileInputFieldP
1212
const {
1313
disabled = false,
1414
fullWidth = false,
15-
helpText = null,
15+
helpText,
1616
id,
1717
isLabelVisible = true,
1818
label,
1919
layout = 'vertical',
2020
required = false,
2121
validationState,
22-
validationText = null,
22+
validationText,
2323
...restProps
2424
} = props;
2525

src/components/FormLayout/FormLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { PREDEFINED_LABEL_WIDTH_VALUES } from './constants';
1414

1515
export const FormLayout: React.FunctionComponent<FormLayoutProps> = ({
1616
autoWidth = false,
17-
children = null,
17+
children,
1818
fieldLayout = defaultValues.layout,
1919
labelWidth = 'default',
2020
...restProps

src/components/Grid/Grid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const Grid: React.FunctionComponent<GridProps> = ({
1010
alignContent,
1111
alignItems,
1212
autoFlow,
13-
children = null,
13+
children,
1414
columnGap = 4,
1515
columns = '1fr',
1616
justifyContent,

src/components/Grid/GridSpan.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import styles from './Grid.module.scss';
77
import { GridSpanProps } from './GridSpan.types';
88

99
export const GridSpan: React.FunctionComponent<GridSpanProps> = ({
10-
children = null,
10+
children,
1111
columns = 1,
1212
rows = 1,
1313
tag: Tag = 'div',

src/components/InputGroup/InputGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const InputGroup: React.FunctionComponent<InputGroupProps> = ({
2828
layout = defaultValues.layout,
2929
required = false,
3030
size = defaultValues.size,
31-
validationTexts = null,
31+
validationTexts,
3232
...restProps
3333
}) => {
3434
const formLayoutContext = useContext(FormLayoutContext);

src/components/Modal/Modal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ export const Modal: React.FunctionComponent<ModalProps> = ({
5757
allowCloseOnEscapeKey = true,
5858
allowPrimaryActionOnEnterKey = true,
5959
autoFocus = true,
60-
children = null,
60+
children,
6161
closeButtonRef,
62-
dialogRef = null,
63-
portalId = null,
62+
dialogRef,
63+
portalId,
6464
position = 'center',
6565
preventScrollUnderneath = window.document.body,
6666
primaryButtonRef,
@@ -125,7 +125,7 @@ export const Modal: React.FunctionComponent<ModalProps> = ({
125125
onKeyDown,
126126
};
127127

128-
if (portalId === null) {
128+
if (portalId === undefined) {
129129
return preRender(
130130
children,
131131
internalDialogRef,

0 commit comments

Comments
 (0)