Skip to content

Commit 4376f29

Browse files
committed
feat(action-buttons): enhance alignments and positions
1 parent 08fb856 commit 4376f29

4 files changed

Lines changed: 52 additions & 9 deletions

File tree

packages/core/scss/components/action-buttons/_layout.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
.k-actions-end {
4343
justify-content: flex-end;
4444
}
45+
.k-actions-justify {
46+
justify-content: space-between;
47+
}
4548
.k-actions-stretched > * {
4649
flex: 1 0 0%;
4750
}
@@ -54,6 +57,7 @@
5457
}
5558
.k-actions-vertical {
5659
flex-flow: column nowrap;
60+
align-items: normal;
5761
}
5862

5963

packages/fluent/scss/action-buttons/_layout.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
.k-actions-end {
4040
justify-content: flex-end;
4141
}
42+
.k-actions-justify {
43+
justify-content: space-between;
44+
}
4245
.k-actions-stretched > * {
4346
flex: 1 0 0%;
4447
}
@@ -50,5 +53,6 @@
5053
}
5154
.k-actions-vertical {
5255
flex-flow: column nowrap;
56+
align-items: normal;
5357
}
5458
}

packages/html/src/action-buttons/action-buttons.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const states = [];
77
const options = {};
88

99
export type KendoActionButtonsProps = {
10-
alignment?: 'start' | 'center' | 'end' | 'stretched';
10+
alignment?: 'start' | 'center' | 'end' | 'stretched' | 'justify';
1111
orientation?: 'horizontal' | 'vertical';
1212
};
1313

packages/html/src/action-buttons/tests/action-buttons.tsx

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ const styles = `
88
}
99
`;
1010

11-
export default () =>(
11+
export default () => (
1212
<>
1313
<style>{styles}</style>
14-
<div id="test-area" className="k-d-grid k-grid-cols-2">
14+
<div id="test-area" className="k-d-grid k-grid-cols-3">
1515
<span>start</span>
1616
<span>end</span>
17+
<span>center</span>
18+
1719
<div>
1820
<ActionButtons alignment="start">
1921
<Button>First</Button>
@@ -28,26 +30,43 @@ export default () =>(
2830
<Button>Third</Button>
2931
</ActionButtons>
3032
</div>
31-
32-
<span>center</span>
33-
<span>stretch</span>
3433
<div>
3534
<ActionButtons alignment="center">
3635
<Button>First</Button>
3736
<Button>Second</Button>
3837
<Button>Third</Button>
3938
</ActionButtons>
4039
</div>
40+
41+
<span>stretch</span>
42+
<span>justify</span>
43+
<span>orientation - vertical</span>
44+
4145
<div>
4246
<ActionButtons alignment="stretched">
4347
<Button>First</Button>
4448
<Button>Second</Button>
4549
<Button>Third</Button>
4650
</ActionButtons>
4751
</div>
52+
<div>
53+
<ActionButtons alignment="justify">
54+
<Button>First</Button>
55+
<Button>Second</Button>
56+
<Button>Third</Button>
57+
</ActionButtons>
58+
</div>
59+
<div>
60+
<ActionButtons orientation="vertical">
61+
<Button>First</Button>
62+
<Button>Second</Button>
63+
<Button>Third</Button>
64+
</ActionButtons>
65+
</div>
4866

4967
<span>rtl start</span>
5068
<span>rtl end</span>
69+
<span>rtl center</span>
5170
<div dir="rtl">
5271
<ActionButtons alignment="start">
5372
<Button>First</Button>
@@ -62,23 +81,39 @@ export default () =>(
6281
<Button>Third</Button>
6382
</ActionButtons>
6483
</div>
65-
66-
<span>rtl center</span>
67-
<span>rtl stretch</span>
6884
<div dir="rtl">
6985
<ActionButtons alignment="center">
7086
<Button>First</Button>
7187
<Button>Second</Button>
7288
<Button>Third</Button>
7389
</ActionButtons>
7490
</div>
91+
92+
<span>rtl stretch</span>
93+
<span>rtl justify</span>
94+
<span>rtl orientation - vertical</span>
95+
7596
<div dir="rtl">
7697
<ActionButtons alignment="stretched">
7798
<Button>First</Button>
7899
<Button>Second</Button>
79100
<Button>Third</Button>
80101
</ActionButtons>
81102
</div>
103+
<div dir="rtl">
104+
<ActionButtons alignment="justify">
105+
<Button>First</Button>
106+
<Button>Second</Button>
107+
<Button>Third</Button>
108+
</ActionButtons>
109+
</div>
110+
<div dir="rtl">
111+
<ActionButtons orientation="vertical">
112+
<Button>First</Button>
113+
<Button>Second</Button>
114+
<Button>Third</Button>
115+
</ActionButtons>
116+
</div>
82117
</div>
83118

84119
</>

0 commit comments

Comments
 (0)