mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore: remove storybook
This commit is contained in:
parent
856086dc71
commit
378fe06e03
116 changed files with 103 additions and 14249 deletions
|
@ -1,28 +0,0 @@
|
|||
<script>
|
||||
export let story = undefined;
|
||||
|
||||
import InlineNotification from "./InlineNotification.svelte";
|
||||
import NotificationActionButton from "./NotificationActionButton.svelte";
|
||||
import ToastNotification from "./ToastNotification.svelte";
|
||||
</script>
|
||||
|
||||
{#if story === 'inline'}
|
||||
<InlineNotification
|
||||
{...$$props}
|
||||
on:close="{() => {
|
||||
console.log('on:close');
|
||||
}}"
|
||||
>
|
||||
<div slot="actions">
|
||||
<NotificationActionButton>{$$props.action}</NotificationActionButton>
|
||||
</div>
|
||||
</InlineNotification>
|
||||
{:else if story === 'toast'}
|
||||
<ToastNotification
|
||||
{...$$props}
|
||||
on:close="{() => {
|
||||
console.log('on:close');
|
||||
}}"
|
||||
style="min-width: 30rem; margin-bottom: .5rem"
|
||||
/>
|
||||
{/if}
|
|
@ -1,48 +0,0 @@
|
|||
import { withKnobs, select, boolean, text } from "@storybook/addon-knobs";
|
||||
import Component from "./Notification.Story.svelte";
|
||||
|
||||
export default { title: "Notification", decorators: [withKnobs] };
|
||||
|
||||
const kinds = {
|
||||
"Error (error)": "error",
|
||||
"Info (info)": "info",
|
||||
"Success (success)": "success",
|
||||
"Warning (warning)": "warning",
|
||||
};
|
||||
|
||||
export const Toast = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: "toast",
|
||||
kind: select("The notification kind (kind)", kinds, "info"),
|
||||
lowContrast: boolean("Use low contrast variant (lowContrast)", false),
|
||||
role: text("ARIA role (role)", "alert"),
|
||||
title: text("Title (title)", "Notification title"),
|
||||
subtitle: text("Subtitle (subtitle)", "Subtitle text goes here."),
|
||||
caption: text("Caption (caption)", "Time stamp [00:00:00]"),
|
||||
iconDescription: text(
|
||||
"Icon description (iconDescription)",
|
||||
"describes the close button"
|
||||
),
|
||||
hideCloseButton: boolean("Hide close button (hideCloseButton)", false),
|
||||
},
|
||||
});
|
||||
|
||||
export const Inline = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: "inline",
|
||||
kind: select("The notification kind (kind)", kinds, "info"),
|
||||
lowContrast: boolean("Use low contrast variant (lowContrast)", false),
|
||||
role: text("ARIA role (role)", "alert"),
|
||||
title: text("Title (title)", "Notification title"),
|
||||
subtitle: text("Subtitle (subtitle)", "Subtitle text goes here."),
|
||||
caption: text("Caption (caption)", "Time stamp [00:00:00]"),
|
||||
iconDescription: text(
|
||||
"Icon description (iconDescription)",
|
||||
"describes the close button"
|
||||
),
|
||||
hideCloseButton: boolean("Hide close button (hideCloseButton)", false),
|
||||
action: text("Action (NotificationActionButton > $$slot#action)", "Action"),
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue