Fix ErrorModal title
This commit is contained in:
parent
1649808727
commit
a0b7539620
2 changed files with 13 additions and 2 deletions
|
@ -17,7 +17,7 @@ const i18n = setupI18n('en', enMessages);
|
|||
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||
buttonVariant: overrideProps.buttonVariant ?? undefined,
|
||||
description: overrideProps.description ?? '',
|
||||
title: overrideProps.title ?? '',
|
||||
title: Object.hasOwn(overrideProps, 'title') ? overrideProps.title : '',
|
||||
i18n,
|
||||
onClose: action('onClick'),
|
||||
});
|
||||
|
@ -48,3 +48,14 @@ export function CustomStrings(): JSX.Element {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function NoTitle(): JSX.Element {
|
||||
return (
|
||||
<ErrorModal
|
||||
{...createProps({
|
||||
title: null,
|
||||
description: 'This is a fun error!',
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue