Skip to content

Commit c9f8f2e

Browse files
committed
refactor(storybook): Removed tailwind from VaDropdown stories (#3676)
1 parent 6c43378 commit c9f8f2e

File tree

4 files changed

+27
-23
lines changed

4 files changed

+27
-23
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:root {
2+
--border-dashed: 1px dashed black;
3+
}

packages/ui/.storybook/storybook-main.scss

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
//@import "../components/vuestic-sass/global/normalize.scss";
77
@import './assets/icons/icons.scss';
88
@import './assets/fonts.scss';
9+
@import './assets/global';
910
@import url('https://unpkg.com/[email protected]/dist/tailwind.min.css');

packages/ui/src/components/va-aspect-ratio/VaAspectRatio.stories.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export default {
99
export const Default = () => ({
1010
components: { VaAspectRatio },
1111
template: `
12-
<va-aspect-ratio
13-
:style="{ width: '200px', border: '1px solid black' }"
12+
<va-aspect-ratio
13+
:style="{ width: '200px', border: 'var(--border-dashed)' }"
1414
:ratio="1/1"
1515
>
1616
Content
@@ -22,15 +22,15 @@ export const Ratio = () => ({
2222
components: { VaAspectRatio },
2323
template: `
2424
[1/1]
25-
<va-aspect-ratio
26-
:style="{ width: '200px', border: '1px solid black' }"
25+
<va-aspect-ratio
26+
:style="{ width: '200px', border: 'var(--border-dashed)' }"
2727
:ratio="1/1"
2828
>
2929
Content
3030
</va-aspect-ratio>
3131
[16/9]
32-
<va-aspect-ratio
33-
:style="{ width: '200px', border: '1px solid black' }"
32+
<va-aspect-ratio
33+
:style="{ width: '200px', border: 'var(--border-dashed)' }"
3434
:ratio="16/9"
3535
>
3636
Content
@@ -42,16 +42,16 @@ export const contentHeightAndWidth = () => ({
4242
components: { VaAspectRatio },
4343
template: `
4444
[200/200]
45-
<va-aspect-ratio
46-
:style="{ width: '200px', border: '1px solid black' }"
45+
<va-aspect-ratio
46+
:style="{ width: '200px', border: 'var(--border-dashed)' }"
4747
:content-width="200"
4848
:content-height="200"
4949
>
5050
Content
5151
</va-aspect-ratio>
5252
[1280/720]
53-
<va-aspect-ratio
54-
:style="{ width: '200px', border: '1px solid black' }"
53+
<va-aspect-ratio
54+
:style="{ width: '200px', border: 'var(--border-dashed)' }"
5555
:content-width="1280"
5656
:content-height="720"
5757
>
@@ -64,16 +64,16 @@ export const maxWidth = () => ({
6464
components: { VaAspectRatio },
6565
template: `
6666
[200]
67-
<va-aspect-ratio
68-
:style="{ width: '500px', border: '1px solid black' }"
67+
<va-aspect-ratio
68+
:style="{ width: '500px', border: 'var(--border-dashed)' }"
6969
:max-width="200"
7070
:ratio="16/9"
7171
>
7272
Content
7373
</va-aspect-ratio>
7474
[500]
75-
<va-aspect-ratio
76-
:style="{ width: '500px', border: '1px solid black' }"
75+
<va-aspect-ratio
76+
:style="{ width: '500px', border: 'var(--border-dashed)' }"
7777
:max-width="500"
7878
:ratio="16/9"
7979
>

packages/ui/src/components/va-dropdown/VaDropdown.stories.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export const Cursor = () => ({
179179
cursor
180180
>
181181
<template #anchor>
182-
<div class="w-32 h-32 border-2 border-gray-1000 border-dashed">
182+
<div style="width: 8rem; height: 8rem; border: var(--border-dashed)">
183183
Right click
184184
</div>
185185
</template>
@@ -204,7 +204,7 @@ export const CursorWithTarget = () => ({
204204
>
205205
<template #anchor>
206206
<div
207-
class="w-32 h-32 border-2 border-gray-1000 border-dashed"
207+
style="width: 8rem; height: 8rem; border: var(--border-dashed)"
208208
ref="cursorTarget"
209209
>
210210
Right click
@@ -219,7 +219,7 @@ export const AnchorSelector = () => ({
219219
components: { VaDropdown },
220220
template: `
221221
<div
222-
class="border-2 border-gray-1000 border-dashed"
222+
style="border: var(--border-dashed)"
223223
id="anchor-selector"
224224
>
225225
Click me
@@ -239,9 +239,9 @@ export const InnerAnchorSelector = () => ({
239239
inner-anchor-selector="#inner-anchor-selector"
240240
>
241241
<template #anchor>
242-
<div class="border-2 border-gray-1000 border-dashed">
242+
<div style="border: var(--border-dashed)">
243243
<div
244-
class="border-2 border-gray-1000 border-dashed m-4"
244+
style="margin: 1rem; border: var(--border-dashed)"
245245
id="inner-anchor-selector"
246246
>
247247
Click me
@@ -306,7 +306,7 @@ export const Autoplacement: StoryFn = () => ({
306306
:target="autoplacementTargetRef"
307307
>
308308
<template #anchor>
309-
<div class="grid place-items-center h-24 w-24 border-2 border-gray-1000 border-dashed">
309+
<div style="width: 6rem; height: 6rem; border: var(--border-dashed)">
310310
</div>
311311
</template>
312312
Dropdown
@@ -337,7 +337,7 @@ export const AutoplacementWithHeight: StoryFn = () => ({
337337
:target="autoplacementTargetRef"
338338
>
339339
<template #anchor>
340-
<div class="grid place-items-center h-24 w-24 border-2 border-gray-1000 border-dashed">
340+
<div style="width: 6rem; height: 6rem; border: var(--border-dashed)">
341341
</div>
342342
</template>
343343
<va-dropdown-content>
@@ -365,15 +365,15 @@ export const StickToEdges: StoryFn = () => ({
365365
ref="autoplacementTargetRef"
366366
v-scroll-to-middle-x
367367
>
368-
<div style="height: 100%;width: 200%;display: grid;place-items: center;">
368+
<div style="height: 100%; width: 200%; display: grid; place-items: center;">
369369
<va-dropdown
370370
:model-value="true"
371371
:stateful="false"
372372
:target="autoplacementTargetRef"
373373
stick-to-edges
374374
>
375375
<template #anchor>
376-
<div class="grid place-items-center h-24 w-24 border-2 border-gray-1000 border-dashed">
376+
<div style="width: 6rem; height: 6rem; border: var(--border-dashed)">
377377
</div>
378378
</template>
379379
<div>

0 commit comments

Comments
 (0)