;
export const Default: Story = {
render: (args) => ({
props: args,
template: `
(args)}>
`,
}),
};
export const Variants: Story = {
render: (args) => ({
props: args,
template: `
(args)} variant="success">
(args)} variant="info">
(args)} variant="warning">
(args)} variant="error">
`,
}),
};
/**
* Avoid using long messages in toasts.
*/
export const LongContent: Story = {
...Default,
args: {
title: "Foo",
message: [
"Maecenas commodo posuere quam, vel malesuada nulla accumsan ac.",
"Pellentesque interdum ligula ante, eget bibendum ante lacinia congue.",
],
},
};
export const Service: Story = {
render: (args) => ({
props: {
toastOptions: args,
},
template: /*html*/ `
`,
}),
args: {
title: "",
message: "Hello Bitwarden!",
variant: "error",
timeout: BitwardenToastrGlobalConfig.timeOut,
} as ToastOptions,
parameters: {
chromatic: { disableSnapshot: true },
docs: {
source: {
code: toastServiceExampleTemplate,
},
},
},
};