-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathOffcanvas.stories.ts
More file actions
58 lines (53 loc) · 1.72 KB
/
Offcanvas.stories.ts
File metadata and controls
58 lines (53 loc) · 1.72 KB
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
import Btn from '@/components/Button';
import Offcanvas from '.';
import {placements} from '@/composables/usePlacement';
export default {
title: 'Components/Offcanvas',
component: Offcanvas,
argTypes: {
backdrop: {
control: {type: 'boolean'},
},
header: {
control: {type: 'text'},
},
noBody: {
control: {type: 'boolean'},
},
placement: {
control: {type: 'select'},
options: placements,
},
scroll: {
control: {type: 'boolean'},
},
show: {
control: {type: 'boolean'},
},
},
};
const template = (args) => ({
components: {Btn, Offcanvas},
setup: () => ({args}),
template: `
<Btn
data-bs-toggle="offcanvas"
data-bs-target="#offcanvas"
>
Launch offcanvas
</Btn>
<p style="max-width: 100px;">
Dummy content to make the container scrollable.
Leave that to me. Send a distress signal, and inform the Senate that all on board were killed. Obi-Wan is here. The Force is with him. You mean it controls your actions? As you wish. I find your lack of faith disturbing.
Hokey religions and ancient weapons are no match for a good blaster at your side, kid. Still, she's got a lot of spirit. I don't know, what do you think? Don't underestimate the Force. Still, she's got a lot of spirit. I don't know, what do you think?
</p>
<Offcanvas
id="offcanvas"
header="Offcanvas header"
v-bind="args"
>
Offcanvas body
</Offcanvas>
`,
});
export const Default = template.bind({});