2022-07-23 00:39:50 +00:00
|
|
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
|
|
import { Info } from "react-feather";
|
|
|
|
|
2022-08-24 20:18:42 +00:00
|
|
|
import Banner from "@calcom/ui/v2/core/banner";
|
2022-07-23 00:39:50 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
title: "Banner",
|
|
|
|
component: Banner,
|
|
|
|
} as ComponentMeta<typeof Banner>;
|
|
|
|
|
|
|
|
export const Default = () => {
|
|
|
|
return (
|
|
|
|
<Banner
|
|
|
|
variant="neutral"
|
|
|
|
title="Summarise what happened"
|
|
|
|
description="Describe what can be done about it here."
|
|
|
|
Icon={Info}
|
|
|
|
onDismiss={() => console.log("dismissed")}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Warning = () => {
|
|
|
|
return (
|
|
|
|
<Banner
|
|
|
|
variant="warning"
|
|
|
|
title="Summarise what happened"
|
|
|
|
description="Describe what can be done about it here."
|
|
|
|
Icon={Info}
|
|
|
|
onDismiss={() => console.log("dismissed")}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Error = () => {
|
|
|
|
return (
|
|
|
|
<Banner
|
|
|
|
variant="error"
|
|
|
|
title="Summarise what happened"
|
|
|
|
description="Describe what can be done about it here."
|
|
|
|
errorMessage="Event creation failed"
|
|
|
|
Icon={Info}
|
|
|
|
onDismiss={() => console.log("dismissed")}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|