Skip to content

Commit 20c932e

Browse files
vladimir-kubaVladimir Kubantsev
andauthored
fix(ArrayBase): align items first baseline (#336)
Co-authored-by: Vladimir Kubantsev <[email protected]>
1 parent 3d7fd83 commit 20c932e

File tree

7 files changed

+31
-1
lines changed

7 files changed

+31
-1
lines changed

src/lib/kit/components/Inputs/ArrayBase/ArrayBase.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
align-items: flex-end;
77

88
.#{$ns}transparent {
9-
align-items: flex-end;
9+
align-items: flex-start;
1010
}
1111
}
1212

Loading
Loading
Loading
Loading

src/lib/kit/components/Inputs/ArrayBase/__tests__/ArrayBase.visual.test.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ test.describe('Array Base', () => {
4040
await expectScreenshot();
4141
});
4242

43+
test('error remove button', async ({mount, expectScreenshot}) => {
44+
const component = await mount(<DynamicForm spec={ARRAY_BASE.errorRemoveButton} />);
45+
const input = component.getByRole('textbox').first();
46+
47+
await input.focus();
48+
await input.blur();
49+
50+
await expectScreenshot();
51+
});
52+
4353
test('description', async ({mount, expectScreenshot}) => {
4454
await mount(<DynamicForm spec={ARRAY_BASE.description} />);
4555

src/lib/kit/components/Inputs/ArrayBase/__tests__/helpers.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,26 @@ export const ARRAY_BASE: Record<string, ArraySpec> = {
102102
itemLabel: 'Add element',
103103
},
104104
},
105+
errorRemoveButton: {
106+
type: SpecTypes.Array,
107+
defaultValue: ['foo'],
108+
items: {
109+
type: SpecTypes.String,
110+
pattern: 'bar',
111+
viewSpec: {
112+
type: 'base',
113+
layout: 'row',
114+
layoutTitle: 'Element',
115+
},
116+
},
117+
viewSpec: {
118+
type: 'base',
119+
layout: 'accordeon',
120+
layoutTitle: 'Elements',
121+
layoutOpen: true,
122+
itemLabel: 'Add element',
123+
},
124+
},
105125
description: {
106126
defaultValue: ['foo', 'bar', 'rab', 'oof'],
107127
type: SpecTypes.Array,

0 commit comments

Comments
 (0)