mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
37 lines
761 B
TypeScript
37 lines
761 B
TypeScript
|
import React from "react";
|
||
|
import { Meta, Story } from "@storybook/react";
|
||
|
import { noop } from "lodash";
|
||
|
|
||
|
import FlashMessage from ".";
|
||
|
|
||
|
import { IFlashMessage } from "./FlashMessage";
|
||
|
|
||
|
import "../../index.scss";
|
||
|
|
||
|
export default {
|
||
|
component: FlashMessage,
|
||
|
title: "Components/FlashMessage",
|
||
|
argTypes: {
|
||
|
fullWidth: {
|
||
|
control: "boolean",
|
||
|
},
|
||
|
isPersistent: {
|
||
|
control: "boolean",
|
||
|
},
|
||
|
},
|
||
|
args: {
|
||
|
fullWidth: true,
|
||
|
isPersistent: true,
|
||
|
notification: {
|
||
|
message: "I am a message. Hear me roar!",
|
||
|
alertType: "success",
|
||
|
isVisible: true,
|
||
|
undoAction: noop,
|
||
|
},
|
||
|
},
|
||
|
} as Meta;
|
||
|
|
||
|
const Template: Story<IFlashMessage> = (props) => <FlashMessage {...props} />;
|
||
|
|
||
|
export const Default = Template.bind({});
|