-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Benjamin Perez <[email protected]>
- Loading branch information
Showing
10 changed files
with
2,177 additions
and
1,795 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
dist/esm/types/src/components/NotificationAlert/NotificationAlert.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { FC } from "react"; | ||
import { NotificationAlertPrp } from "./NotificationAlert.types"; | ||
declare const NotificationAlert: FC<NotificationAlertPrp>; | ||
export default NotificationAlert; |
23 changes: 23 additions & 0 deletions
23
dist/esm/types/src/components/NotificationAlert/NotificationAlert.types.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ReactNode } from "react"; | ||
export type AlertDesignMode = "banner" | "card"; | ||
export type NotificationEmphasis = "subtle" | "minimal"; | ||
export type NotificationVariant = | ||
| "neutral" | ||
| "information" | ||
| "success" | ||
| "warning" | ||
| "danger"; | ||
export interface NotificationAlertBase { | ||
title: string; | ||
children: ReactNode; | ||
action?: ReactNode; | ||
onClose?: () => void; | ||
} | ||
export interface NotificationAlertConstruct { | ||
designMode?: AlertDesignMode; | ||
emphasisMode?: NotificationEmphasis; | ||
variant?: NotificationVariant; | ||
shadow?: boolean; | ||
} | ||
export type NotificationAlertPrp = NotificationAlertBase & | ||
NotificationAlertConstruct; |
6 changes: 6 additions & 0 deletions
6
dist/esm/types/src/components/NotificationStack/NotificationStack.types.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from "react"; | ||
export interface NotificationStackProps { | ||
id: number; | ||
message: React.ReactNode; | ||
duration: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { NotificationStackProps } from "./NotificationStack.types"; | ||
export declare const useNotifications: () => { | ||
notifications: NotificationStackProps[]; | ||
addNotification: (message: React.ReactNode, duration: number) => void; | ||
removeNotification: (id: number) => void; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters