This repository was archived by the owner on Jan 23, 2022. It is now read-only.
forked from annearbor/nuxt-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmisc.stories.js
74 lines (72 loc) · 2.36 KB
/
misc.stories.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import { storiesOf } from "@storybook/vue";
import { text, select } from "@storybook/addon-knobs";
import notes from "@docs/storybook/misc.md";
import MenuLink from "@components/atoms/MenuLink";
import DropdownMenuMintEc from "@components/organisms/DropdownMenuMintEc";
import BaseButton from "@basecomponents/BaseButton";
import PopupIcon from "@components/legacy/PopupIcon";
import DemoBanner from "@components/legacy/DemoBanner";
import PopupIconInitials from "@components/legacy/PopupIconInitials";
storiesOf("7 Others/Misc", module)
.addParameters({
notes,
})
.add("DropdownMenuMintEc", () => ({
components: { DropdownMenuMintEc, MenuLink },
// added border for correct screenshots
template: `
<div style="border: 1px solid #ccc; padding: 1rem;">
<DropdownMenuMintEc style="float: none">
<template v-slot:header>Dropdown</template>
<MenuLink to="/">Link 1</MenuLink>
<MenuLink to="/">Link 2</MenuLink>
<MenuLink to="/">Link 3</MenuLink>
</DropdownMenuMintEc>
</div>
`,
}))
.add("Toast", () => ({
components: { BaseButton },
data: () => ({
type: select(
"type",
{ show: "show", info: "info", success: "success", error: "error" },
"show"
),
message: text("message", "Toast 🧐"),
}),
template: `
<div>
<BaseButton @click="$toast[type](message)">Knobs Toast</BaseButton>
<br>
<BaseButton @click="$toast.show('Show 🧐')">Default Toast</BaseButton>
<BaseButton @click="$toast.info('Info 🤓')">Info Toast</BaseButton>
<BaseButton @click="$toast.success('Success 😊')" design="success">Success Toast</BaseButton>
<BaseButton @click="$toast.error('Error 😥')" design="danger">Error Toast</BaseButton>
</div>
`,
}))
.add("Popup Icon", () => ({
components: { PopupIcon },
template: `<div>
<PopupIcon source="fa" icon="address-book">
DropDown Content
</PopupIcon>
</div>`,
}))
.add("Popup Icon with Initials", () => ({
components: { PopupIconInitials, MenuLink },
// added border for correct screenshots
template: `<span style="border: 1px solid #ccc; padding: 1rem;">
<PopupIconInitials firstname="Fritz" lastname="Schmidt">
<MenuLink to="/">Link 1</MenuLink>
<MenuLink to="/">Link 2</MenuLink>
</PopupIconInitials>
</span>`,
}))
.add("Demo Banner", () => ({
components: { DemoBanner },
template: `<div>
<DemoBanner></DemoBanner>
</div>`,
}));