x
1
2
3
4
5
6
7
8
9
10
11
12
13
<div class="d-flex"> <div data-view-component="true" class="StackItem p-3 m-1 color-bg-success rounded-2"> Adjust this item </div> <div data-view-component="true" class="StackItem p-3 m-1 color-bg-accent rounded-2"> Fixed width </div> <div data-view-component="true" class="StackItem p-3 m-1 color-bg-attention rounded-2"> Fixed width </div></div>
1
2
3
4
5
6
7
8
9
10
11
<div class="d-flex"> <%= render(Primer::Alpha::StackItem.new(**system_arguments, p: 3, m: 1, bg: :success, border_radius: 2)) do %> Adjust this item <% end %> <%= render(Primer::Alpha::StackItem.new(p: 3, m: 1, bg: :accent, border_radius: 2)) do %> Fixed width <% end %> <%= render(Primer::Alpha::StackItem.new(p: 3, m: 1, bg: :attention, border_radius: 2)) do %> Fixed width <% end %></div>
No notes provided.
Param | Description | Input |
---|---|---|
— |
|
|
— |
|
|
— |
|
|
— |
|
|
— |
|
app/components/primer/alpha/stack_item.css
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
.StackItem { flex: 0 1 auto; min-inline-size: 0;}.StackItem[data-grow='true'],.StackItem[data-grow-narrow='true'] { flex-grow: 1; }/* @custom-media --veiwportRange-regular */@media (min-width: 48rem) { .StackItem[data-grow-regular='true'] { flex-grow: 1; } .StackItem[data-grow-regular='false'] { flex-grow: 0; } }/* @custom-media --viewportRange-wide */@media (min-width: 87.5rem) { .StackItem[data-grow-wide='true'] { flex-grow: 1; } .StackItem[data-grow-wide='false'] { flex-grow: 0; } }