13
13
14
14
<Shw::Grid @columns ={{ 2 }} as |SG|>
15
15
{{ #each @model.POSITIONS as |position |}}
16
- <SG .Item {{ style padding =" 5em" }} @label ={{ capitalize position }} >
17
- <Hds::Dropdown @isOpen ={{ true }} @listPosition ={{ position }} as |D|>
18
- <D .ToggleButton @color =" secondary" @text =" Menu" />
19
- <D .Interactive @href =" #" >Create</D .Interactive>
20
- <D .Interactive @href =" #" >Edit</D .Interactive>
21
- </Hds::Dropdown >
16
+ <SG .Item @label ={{ capitalize position }} >
17
+ <Shw::Outliner {{ style padding =" 6em 12em" }} >
18
+ <Hds::Dropdown @isOpen ={{ true }} @listPosition ={{ position }} as |D|>
19
+ <D .ToggleButton @color =" secondary" @text =" Menu" />
20
+ <D .Interactive @href =" #" >Create</D .Interactive>
21
+ <D .Interactive @href =" #" >Edit</D .Interactive>
22
+ </Hds::Dropdown >
23
+ </Shw::Outliner >
22
24
</SG .Item>
23
25
{{ /each }}
24
26
</Shw::Grid >
25
27
26
28
<Shw::Divider @level ={{ 2 }} />
27
29
30
+ <Shw::Text::H2 >Width</Shw::Text::H2 >
31
+
32
+ <Shw::Grid @columns ={{ 4 }} @gap =" 2rem" as |SG|>
33
+ {{ #let (array false true ) as |options |}}
34
+ {{ #each options as |option |}}
35
+ <SG .Item @label =" matchToggleWidth={{ option }} " as |SGI|>
36
+ <SGI .Label><code >ToggleButton</code > auto</SGI .Label>
37
+ <div class =" shw-component-dropdown-fixed-height-container" >
38
+ <Hds::Dropdown @isOpen ={{ true }} @listPosition =" bottom-left" @matchToggleWidth ={{ option }} as |D|>
39
+ <D .ToggleButton @color =" secondary" @text =" Menu" />
40
+ <D .Interactive @href =" #" >
41
+ Lorem ipsum dolor sit amet
42
+ </D .Interactive>
43
+ <D .Interactive @href =" #" >
44
+ Consectetur adipisicing elit
45
+ </D .Interactive>
46
+ </Hds::Dropdown >
47
+ </div >
48
+ </SG .Item>
49
+ <SG .Item @label =" matchToggleWidth={{ option }} " as |SGI|>
50
+ <SGI .Label><code >ToggleButton</code > 100%</SGI .Label>
51
+ <div class =" shw-component-dropdown-fixed-height-container" >
52
+ <Hds::Dropdown @isOpen ={{ true }} @listPosition =" bottom-left" @matchToggleWidth ={{ option }} as |D|>
53
+ <D .ToggleButton {{ style width =" 100%" }} @color =" secondary" @text =" Menu" />
54
+ <D .Interactive @href =" #" >
55
+ Lorem ipsum dolor sit amet
56
+ </D .Interactive>
57
+ <D .Interactive @href =" #" >
58
+ Consectetur adipisicing elit
59
+ </D .Interactive>
60
+ </Hds::Dropdown >
61
+ </div >
62
+ </SG .Item>
63
+ <SG .Item @label =" matchToggleWidth={{ option }} " as |SGI|>
64
+ <SGI .Label><code >ToggleButton</code > auto + <code >@width="200px"</code ></SGI .Label>
65
+ <div class =" shw-component-dropdown-fixed-height-container" >
66
+ <Hds::Dropdown
67
+ @isOpen ={{ true }}
68
+ @listPosition =" bottom-left"
69
+ @width =" 200px"
70
+ @matchToggleWidth ={{ option }}
71
+ as |D|
72
+ >
73
+ <D .ToggleButton @color =" secondary" @text =" Menu" />
74
+ <D .Interactive @href =" #" >
75
+ Lorem ipsum dolor sit amet
76
+ </D .Interactive>
77
+ <D .Interactive @href =" #" >
78
+ Consectetur adipisicing elit
79
+ </D .Interactive>
80
+ </Hds::Dropdown >
81
+ </div >
82
+ </SG .Item>
83
+ <SG .Item @label =" matchToggleWidth={{ option }} " as |SGI|>
84
+ <SGI .Label><code >ToggleButton</code > auto + <code >@width="100%"</code ></SGI .Label>
85
+ <div class =" shw-component-dropdown-fixed-height-container" >
86
+ <Hds::Dropdown
87
+ @isOpen ={{ true }}
88
+ @listPosition =" bottom-left"
89
+ @width =" 100%"
90
+ @matchToggleWidth ={{ option }}
91
+ as |D|
92
+ >
93
+ <D .ToggleButton @color =" secondary" @text =" Menu" />
94
+ <D .Interactive @href =" #" >
95
+ Lorem ipsum dolor sit amet
96
+ </D .Interactive>
97
+ <D .Interactive @href =" #" >
98
+ Consectetur adipisicing elit
99
+ </D .Interactive>
100
+ </Hds::Dropdown >
101
+ </div >
102
+ </SG .Item>
103
+ {{ /each }}
104
+ {{ /let }}
105
+ </Shw::Grid >
106
+
107
+ <Shw::Divider @level ={{ 2 }} />
108
+
28
109
<Shw::Text::H2 >Display</Shw::Text::H2 >
29
110
30
111
<Shw::Flex as |SF|>
1525
1606
<section >
1526
1607
<Shw::Text::H2 >Demo</Shw::Text::H2 >
1527
1608
1528
- <Shw::Grid @columns ={{ 2 }} @gap =" 2rem" as |SG|>
1529
- <SG .Item @label =" With fixed width" >
1530
- <div class =" shw-component-dropdown-fixed-height-container" >
1531
- <Hds::Dropdown @listPosition =" bottom-left" @width =" 200px" as |D|>
1532
- <D .ToggleButton @color =" secondary" @text =" Menu" />
1533
- <D .Interactive @href =" #" >
1534
- Lorem ipsum dolor sit amet
1535
- </D .Interactive>
1536
- <D .Interactive @href =" #" >
1537
- Consectetur adipisicing elit
1538
- </D .Interactive>
1539
- </Hds::Dropdown >
1540
- </div >
1541
- </SG .Item>
1542
- <SG .Item @label =" With 100% width" >
1543
- <div class =" shw-component-dropdown-fixed-height-container" >
1544
- <Hds::Dropdown @listPosition =" bottom-left" @width =" 100%" as |D|>
1545
- <D .ToggleButton @color =" secondary" @text =" Menu" />
1546
- <D .Interactive @href =" #" >
1547
- Lorem ipsum dolor sit amet
1548
- </D .Interactive>
1549
- <D .Interactive @href =" #" >
1550
- Consectetur adipisicing elit
1551
- </D .Interactive>
1552
- </Hds::Dropdown >
1553
- </div >
1554
- </SG .Item>
1555
- <SG .Item as |SG|>
1556
- <SG .Label>Using <code >preserveContentInDom</code > argument</SG .Label>
1609
+ <Shw::Flex as |SF|>
1610
+ <SF .Label>Using <code >preserveContentInDom</code ></SF .Label>
1611
+ <SF .Item>
1557
1612
<div class =" shw-component-dropdown-fixed-height-container" >
1558
1613
<Hds::Dropdown @listPosition =" bottom-left" @preserveContentInDom ={{ true }} as |D|>
1559
1614
<D .ToggleButton @color =" secondary" @text =" Menu" />
1568
1623
</D .Footer>
1569
1624
</Hds::Dropdown >
1570
1625
</div >
1571
- </SG .Item>
1572
- </Shw::Grid >
1626
+ </SF .Item>
1627
+ </Shw::Flex >
1573
1628
1574
1629
</section >
0 commit comments