Skip to content

Commit 537fd8d

Browse files
authored
feat: Desing change (#276)
1 parent 36af757 commit 537fd8d

File tree

728 files changed

+155
-120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

728 files changed

+155
-120
lines changed

docs/styles.md

Lines changed: 59 additions & 53 deletions

playwright/core/mountFixture.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22

3+
// eslint-disable-next-line import/no-extraneous-dependencies
34
import type {JsonObject} from '@playwright/experimental-ct-core/types/component';
45
import type {MountOptions} from '@playwright/experimental-ct-react';
56

@@ -9,14 +10,19 @@ export const mountFixture: PlaywrightFixture<MountFixture> = async ({mount: base
910
const mount = async (
1011
component: JSX.Element,
1112
options?: MountOptions<JsonObject> | undefined,
13+
style?: React.CSSProperties | undefined,
1214
) => {
1315
return await baseMount(
1416
<div
15-
style={{
16-
padding: 20,
17-
width: 'fit-content',
18-
height: 'fit-content',
19-
}}
17+
style={
18+
style
19+
? style
20+
: {
21+
padding: 20,
22+
width: 'fit-content',
23+
height: 'fit-content',
24+
}
25+
}
2026
className="playwright-wrapper-test"
2127
>
2228
{component}

playwright/core/types.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type {ComponentFixtures} from '@playwright/experimental-ct-react';
21
import type {
32
Locator,
43
PageScreenshotOptions,
@@ -8,6 +7,26 @@ import type {
87
PlaywrightWorkerOptions,
98
TestFixture,
109
} from '@playwright/test';
10+
import type {MountOptions} from '@playwright/experimental-ct-react';
11+
12+
type JsonPrimitive = string | number | boolean | null;
13+
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
14+
type JsonArray = JsonValue[];
15+
16+
type JsonObject = {[Key in string]?: JsonValue};
17+
18+
interface MountResult extends Locator {
19+
unmount(): Promise<void>;
20+
update(component: JSX.Element): Promise<void>;
21+
}
22+
23+
interface ComponentFixtures {
24+
mount<HooksConfig extends JsonObject>(
25+
component: JSX.Element,
26+
options?: MountOptions<HooksConfig>,
27+
style?: React.CSSProperties | undefined,
28+
): Promise<MountResult>;
29+
}
1130

1231
type PlaywrightTestFixtures = PlaywrightTestArgs & PlaywrightTestOptions & ComponentFixtures;
1332
type PlaywrightWorkerFixtures = PlaywrightWorkerArgs & PlaywrightWorkerOptions;

src/lib/kit/components/AccordeonCard/AccordeonCard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
}
9292

9393
&__interal-actions {
94-
margin-right: var(--df-accordeon-card-interal-actions-margin-right, $df-offset-5);
94+
margin-right: var(--df-accordeon-card-interal-actions-margin-right, var(--g-spacing-1));
9595
}
9696

9797
&__toggle-icon_open {

src/lib/kit/components/Card/Card.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
align-items: center;
6060

6161
& > * {
62-
margin-left: var(--df-card-header-right-child-margin-left, $df-offset-10);
62+
margin-left: var(--df-card-header-right-child-margin-left, var(--g-spacing-2));
6363
}
6464
}
6565

@@ -75,7 +75,7 @@
7575
}
7676

7777
&__note {
78-
margin-left: var(--df-card-note-margin-left, $df-offset-5);
78+
margin-left: var(--df-card-note-margin-left, var(--g-spacing-1));
7979

8080
.gc-help-popover {
8181
display: flex;
176 Bytes
16 Bytes
18 Bytes
19 Bytes
147 Bytes

0 commit comments

Comments
 (0)