Skip to content

Commit 6d65e90

Browse files
committed
feat(Modal): fix CR comments
1 parent e8e418b commit 6d65e90

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/core/src/components/ModalNew/Modal/Modal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const Modal = forwardRef(
2727
}: ModalProps,
2828
ref: React.ForwardedRef<HTMLDivElement>
2929
) => {
30-
const [titleId, setTitleId] = useState<string>("");
31-
const [descriptionId, setDescriptionId] = useState<string>("");
30+
const [titleId, setTitleId] = useState<string>();
31+
const [descriptionId, setDescriptionId] = useState<string>();
3232

3333
const setTitleIdCallback = useCallback((id: string) => setTitleId(id), []);
3434
const setDescriptionIdCallback = useCallback((id: string) => setDescriptionId(id), []);
@@ -83,8 +83,8 @@ const Modal = forwardRef(
8383
data-testid={dataTestId || getTestId(ComponentDefaultTestId.MODAL_NEXT, id)}
8484
role="dialog"
8585
aria-modal
86-
aria-labelledby={titleId || undefined}
87-
aria-describedby={descriptionId || undefined}
86+
aria-labelledby={titleId}
87+
aria-describedby={descriptionId}
8888
>
8989
<ModalTopActions
9090
renderAction={renderHeaderAction}

packages/core/src/components/ModalNew/Modal/Modal.types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface ModalProps extends VibeComponentProps {
1414
size?: ModalSize;
1515
closeButtonTheme?: ModalTopActionsProps["color"];
1616
closeButtonAriaLabel?: ModalTopActionsProps["closeButtonAriaLabel"];
17-
onClose?: (e: ModalCloseEvent) => void;
17+
onClose?: (event: ModalCloseEvent) => void;
1818
renderHeaderAction?: ModalTopActionsProps["renderAction"];
1919
children: React.ReactNode;
2020
}

packages/core/src/components/ModalNew/ModalTopActions/ModalTopActions.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ export interface ModalTopActionsProps {
1919
| ((color?: ModalTopActionsButtonColor) => React.ReactElement<typeof MenuButton | typeof IconButton>);
2020
color?: ModalTopActionsColor;
2121
closeButtonAriaLabel?: string;
22-
onClose?: (e: React.MouseEvent<HTMLButtonElement>) => void;
22+
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
2323
}

0 commit comments

Comments
 (0)