import { Meta , Story } from "@storybook/react" ; import React from "react" ; import { Notification } from "./Notification" ; import type { NotificationProps } from "./types" ; const props = { title : "Title" , onClose : ( ) => undefined , type : "info" } ; export const Info = ( ) => < Notification { ... props } / > ; export const Warn = ( ) => < Notification { ... props } type = "warning" / > ; export const Success = ( ) => < Notification { ... props } type = "success" / > ; export const Error = ( ) => < Notification { ... props } type = "error" / > ; export const WithAction = ( ) => ( < Notification { ... props } action = { { label : "Action" , onClick : ( ) => undefined } } />); export const WithContent = ( ) => ( < Notification { ... props } content = "Some notification content" / > ) ; export const WithActionAndContent = ( ) => ( < Notification { ... props } content = "Some notification content" action = { { label : "Action" , onClick : ( ) => undefined } } />); export default { title : "Notification" } as Meta ;