From b0ca7b2ce3056f0c294ce4103c7f0f65ed858059 Mon Sep 17 00:00:00 2001 From: gabaldon Date: Wed, 4 Sep 2024 16:11:44 +0200 Subject: [PATCH] fix: use `WRoundedIcon` for `WCard` --- .../{ => AnimatedArrow}/AnimatedArrow.vue | 4 +- src/components/Button/WButton.spec.ts | 2 +- src/components/Button/WButton.vue | 2 +- src/components/Card/BaseCard.vue | 38 +++++++++++++ src/components/Card/WCard.spec.ts | 2 +- src/components/Card/WCard.stories.ts | 24 ++++++-- src/components/Card/WCard.vue | 45 ++++++--------- .../Card/__snapshots__/WCard.spec.ts.snap | 56 +++++++++++++------ .../IconRounded/WIconRounded.stories.ts | 3 +- src/components/IconRounded/WIconRounded.vue | 10 +++- .../__snapshots__/WIconRounded.spec.ts.snap | 2 +- .../__snapshots__/WIconText.spec.ts.snap | 2 +- src/components/RoundedIcon.vue | 21 ------- 13 files changed, 131 insertions(+), 80 deletions(-) rename src/components/{ => AnimatedArrow}/AnimatedArrow.vue (90%) create mode 100644 src/components/Card/BaseCard.vue delete mode 100644 src/components/RoundedIcon.vue diff --git a/src/components/AnimatedArrow.vue b/src/components/AnimatedArrow/AnimatedArrow.vue similarity index 90% rename from src/components/AnimatedArrow.vue rename to src/components/AnimatedArrow/AnimatedArrow.vue index bae5543..cabcd5f 100644 --- a/src/components/AnimatedArrow.vue +++ b/src/components/AnimatedArrow/AnimatedArrow.vue @@ -7,8 +7,8 @@ + \ No newline at end of file diff --git a/src/components/Card/WCard.spec.ts b/src/components/Card/WCard.spec.ts index 3aeb719..a196a47 100644 --- a/src/components/Card/WCard.spec.ts +++ b/src/components/Card/WCard.spec.ts @@ -3,7 +3,7 @@ import { describe, it, expect } from 'vitest' import { mount } from '@vue/test-utils' import WCard from './WCard.vue' import { CardType } from './WCard' -import AnimatedArrow from '../AnimatedArrow.vue' +import AnimatedArrow from '../AnimatedArrow/AnimatedArrow.vue' describe('WCard', () => { it('base', () => { diff --git a/src/components/Card/WCard.stories.ts b/src/components/Card/WCard.stories.ts index 492e965..80c0b53 100644 --- a/src/components/Card/WCard.stories.ts +++ b/src/components/Card/WCard.stories.ts @@ -23,10 +23,11 @@ export const Base: Story = { setup() { return { args } }, - template: `` + template: `` }), args: { - type: 'base' + type: 'base', + title: 'Lorem ipsum' } } @@ -39,7 +40,20 @@ export const Icon: Story = { setup() { return { args } }, - template: `` + template: `` }), args: { type: 'icon', @@ -56,10 +70,10 @@ export const Link: Story = { setup() { return { args } }, - template: `` + template: `` }), args: { type: 'link', - title: 'Custom link title', + title: 'Lorem ipsum', } } diff --git a/src/components/Card/WCard.vue b/src/components/Card/WCard.vue index 2829d12..6f4f0f5 100644 --- a/src/components/Card/WCard.vue +++ b/src/components/Card/WCard.vue @@ -8,30 +8,26 @@ @mouseenter="toggleHover" @mouseleave="toggleHover" > -
-
-

- {{ title }} -

- -
-
- -
+ + + -
- + + +
-
- +
+ Icon - +

{{ title }} @@ -47,16 +43,16 @@ {{ urlLabel }}

-
diff --git a/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap b/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap index 811a4fc..6c425b8 100644 --- a/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap +++ b/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap @@ -2,7 +2,7 @@ exports[`WIconRounded > renders properly 1`] = `
diff --git a/src/components/IconText/__snapshots__/WIconText.spec.ts.snap b/src/components/IconText/__snapshots__/WIconText.spec.ts.snap index 3e05f39..d725568 100644 --- a/src/components/IconText/__snapshots__/WIconText.spec.ts.snap +++ b/src/components/IconText/__snapshots__/WIconText.spec.ts.snap @@ -40,7 +40,7 @@ exports[`WIconText > renders properly ROUNDED RIGHT 1`] = ` target="_blank" >
diff --git a/src/components/RoundedIcon.vue b/src/components/RoundedIcon.vue deleted file mode 100644 index fb6363a..0000000 --- a/src/components/RoundedIcon.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file