diff --git a/src/components/AppNotification/AppNotification.module.css b/src/components/AppNotification/AppNotification.module.css index e5e702994..cff916e50 100644 --- a/src/components/AppNotification/AppNotification.module.css +++ b/src/components/AppNotification/AppNotification.module.css @@ -46,6 +46,10 @@ max-width: 1320px; display: flex; gap: 0.5rem; + + & > section { + width: 100%; + } } .app-notification__close-btn { diff --git a/src/components/AppNotification/AppNotification.stories.tsx b/src/components/AppNotification/AppNotification.stories.tsx index f9a8ecc3f..b9a405957 100644 --- a/src/components/AppNotification/AppNotification.stories.tsx +++ b/src/components/AppNotification/AppNotification.stories.tsx @@ -24,6 +24,9 @@ export default { type: null, }, }, + subTitle: { + control: 'text', + }, }, } as Meta; @@ -63,6 +66,7 @@ export const LightColor: StoryObj = { export const WithDismissAndControls: StoryObj = { args: { ...WithControls.args, + subTitle: 'Limited subtitle text', onDismiss: () => { console.log('dismissing!'); }, diff --git a/src/components/AppNotification/AppNotification.tsx b/src/components/AppNotification/AppNotification.tsx index 3f4cbb684..c65c9f8ea 100644 --- a/src/components/AppNotification/AppNotification.tsx +++ b/src/components/AppNotification/AppNotification.tsx @@ -4,7 +4,7 @@ import { ButtonV2 as Button } from '../Button'; import Text from '../Text'; import styles from './AppNotification.module.css'; -export interface Props { +export interface AppNotificationProps { // Design API /** * The title/heading of the notification @@ -47,7 +47,7 @@ export const AppNotification = ({ subTitle, title, ...other -}: Props) => { +}: AppNotificationProps) => { const componentClassName = clsx( styles['app-notification'], color && styles[`app-notification--color-${color}`], diff --git a/src/components/AppNotification/__snapshots__/AppNotification.test.ts.snap b/src/components/AppNotification/__snapshots__/AppNotification.test.ts.snap index d04aac9a0..e47f7b700 100644 --- a/src/components/AppNotification/__snapshots__/AppNotification.test.ts.snap +++ b/src/components/AppNotification/__snapshots__/AppNotification.test.ts.snap @@ -224,7 +224,7 @@ exports[` WithDismissAndControls story renders snapshot 1`] =

- Lorem ipsum dolor sit amet consectetur. At et vitae quis amet felis mollis in vitae. Eget in neque et molestie. Luctus sed id commodo volutpat. In a eu in id molestie consectetur pellentesque. + Limited subtitle text