From dc1b06e8c5d5d9f1cc88a824fcf5d5ef00a7066e Mon Sep 17 00:00:00 2001 From: LouisMazel Date: Wed, 13 Mar 2024 15:40:30 +0100 Subject: [PATCH] refactor(maz-ui): MazTabsBar - improve animations --- packages/docs/docs/components/maz-tabs.md | 32 +++++----- packages/lib/components/MazBadge.vue | 2 +- packages/lib/components/MazTabsBar.vue | 76 +++++++++++++++-------- packages/playground/src/pages/index.vue | 20 ++++-- 4 files changed, 83 insertions(+), 47 deletions(-) diff --git a/packages/docs/docs/components/maz-tabs.md b/packages/docs/docs/components/maz-tabs.md index 33e6d74827..83a02bfd9e 100644 --- a/packages/docs/docs/components/maz-tabs.md +++ b/packages/docs/docs/components/maz-tabs.md @@ -52,7 +52,7 @@ description: MazTabs is a standalone component to display content in tabs with a const tabs: MazTabsBarItem[] = [ { label: 'First Tab', disabled: false }, - { label: 'Second Tab', disabled: false, badge: { color: 'danger', value: 1, roundedSize: 'full' } }, + { label: 'Second Tab', disabled: false, badge: { color: 'danger', content: 1, roundedSize: 'full' } }, { label: 'Third Tab', disabled: true }, ] @@ -144,20 +144,6 @@ You can choose the name of this query parameter with the props `query-param` `@d - - ## Custom tabs with slot @@ -193,6 +179,20 @@ You can choose the name of this query parameter with the props `query-param` `@d ``` + + ## Types ```ts @@ -201,7 +201,7 @@ type MazTabsBarItem = label: string disabled?: boolean badge?: { - value: string | number + content: string | number color?: BadgeColor pastel?: boolean outline?: boolean diff --git a/packages/lib/components/MazBadge.vue b/packages/lib/components/MazBadge.vue index 23ac62fc61..fb1f779956 100644 --- a/packages/lib/components/MazBadge.vue +++ b/packages/lib/components/MazBadge.vue @@ -38,7 +38,7 @@ diff --git a/packages/playground/src/pages/index.vue b/packages/playground/src/pages/index.vue index a69951f954..74065b76c2 100644 --- a/packages/playground/src/pages/index.vue +++ b/packages/playground/src/pages/index.vue @@ -3,8 +3,6 @@
- -
@@ -16,18 +14,30 @@