Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(AppNotification): apply usage feedback #1949

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/AppNotification/AppNotification.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
max-width: 1320px;
display: flex;
gap: 0.5rem;

& > section {
width: 100%;
}
}

.app-notification__close-btn {
Expand Down
4 changes: 4 additions & 0 deletions src/components/AppNotification/AppNotification.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export default {
type: null,
},
},
subTitle: {
control: 'text',
},
},
} as Meta<Args>;

Expand Down Expand Up @@ -63,6 +66,7 @@ export const LightColor: StoryObj<Args> = {
export const WithDismissAndControls: StoryObj<Args> = {
args: {
...WithControls.args,
subTitle: 'Limited subtitle text',
onDismiss: () => {
console.log('dismissing!');
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppNotification/AppNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -47,7 +47,7 @@ export const AppNotification = ({
subTitle,
title,
...other
}: Props) => {
}: AppNotificationProps) => {
const componentClassName = clsx(
styles['app-notification'],
color && styles[`app-notification--color-${color}`],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ exports[`<AppNotification /> WithDismissAndControls story renders snapshot 1`] =
<p
class="text text--body-md app-notification__sub-title"
>
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
</p>
<div
class="app-notification__actions"
Expand Down
1 change: 1 addition & 0 deletions src/components/AppNotification/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { AppNotification as default } from './AppNotification';
export type { AppNotificationProps } from './AppNotification';
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ export type { IconNameV2 } from './components/Icon';
export type { ButtonV2Props } from './components/Button';
export type { LinkV2Props } from './components/Link';
export type { PageNotificationProps as PageNotificationV2Props } from './components/PageNotification';
export type { AppNotificationProps as AppNotificationV2Props } from './components/AppNotification';
Loading