-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathAuFloatingUi.stories.js
60 lines (57 loc) · 1.44 KB
/
AuFloatingUi.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
import { hbs } from 'ember-cli-htmlbars';
export default {
title: 'Components/Helpers/AuFloatingUI',
argTypes: {
defaultPlacement: {
control: 'select',
options: [
'bottom-start',
'bottom',
'bottom-end',
'top-start',
'top',
'top-end',
],
description: 'Set the default placement of the floater',
},
options: {
control: 'object',
description: 'Set general options of the floater & arrow',
defaultValue: {},
},
},
parameters: {
layout: 'padded',
},
};
const Template = (args) => ({
template: hbs`
<div class="sb-decorator-example-scroller" data-example-scroller>
<div class="sb-decorator-example-scroller-spacer">
<AuFloatingUi @defaultPlacement={{this.defaultPlacement}} as |floatingUI|>
<AuButton
{{floatingUI.reference}}
@skin="primary"
@text="Reference"
>
Reference
</AuButton>
<div
{{floatingUI.floater}}
class="sb-story-example-floater"
>
<div
{{floatingUI.arrow}}
class="sb-story-example-floater-arrow"
></div>
<div class="sb-story-example-floater-content">
<strong>Floater</strong><br/>
Lorem ipsum dolor sit amet
</div>
</div>
</AuFloatingUi>
</div>
</div>`,
context: args,
});
export const Component = Template.bind();