Skip to content

Commit

Permalink
Add decorator for Vue routing and fix hash issues for the tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
cnotv committed Nov 14, 2024
1 parent 4682952 commit 91672b5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@storybook/vue3": "^8.4.2",
"@storybook/vue3-webpack5": "^8.4.2",
"storybook": "^8.4.2",
"storybook-vue3-router": "^5.0.0",
"typescript": "^5.5.3",
"vue-tsc": "^2.1.6"
}
Expand Down
5 changes: 5 additions & 0 deletions storybook/src/stories/Components/Tab.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Meta, StoryObj } from '@storybook/vue3';
import Tab from '@shell/components/Tabbed/Tab';
import Tabbed from '@shell/components/Tabbed';
import { vueRouter } from 'storybook-vue3-router'

const meta: Meta<typeof Tabbed> = {
component: Tabbed,
Expand Down Expand Up @@ -32,6 +33,10 @@ export const Default: Story = {
args: { useHash: false },
};

Default.decorators = [
vueRouter()
]

export const Editable: Story = {
...Default,
render: (args: any) => ({
Expand Down
19 changes: 19 additions & 0 deletions storybook/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,11 @@
de-indent "^1.0.2"
he "^1.2.0"

"@vue/devtools-api@^6.6.4":
version "6.6.4"
resolved "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz#cbe97fe0162b365edc1dba80e173f90492535343"
integrity sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==

"@vue/[email protected]":
version "2.1.6"
resolved "https://registry.npmjs.org/@vue/language-core/-/language-core-2.1.6.tgz#b48186bdb9b3ef2b83e1f76d5b1ac357b3a7ed94"
Expand Down Expand Up @@ -4403,6 +4408,13 @@ static-extend@^0.1.1:
define-property "^0.2.5"
object-copy "^0.1.0"

storybook-vue3-router@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/storybook-vue3-router/-/storybook-vue3-router-5.0.0.tgz#7e2f52f7c5cbf78324cdbdeb98f909cea7a1a0dc"
integrity sha512-Q5ePPv8xyYT+9IzcEMSAQeCT8OlPDX0rfUfYCmiYDXsGPvvDej2Oyid3wyaxZmU/LXt1XzMDRO3v9qk/EN6pXg==
dependencies:
vue-router "^4.2.5"

storybook@^8.4.2:
version "8.4.2"
resolved "https://registry.npmjs.org/storybook/-/storybook-8.4.2.tgz#02e71cf32db25af713b3681b1b52be1403b478dd"
Expand Down Expand Up @@ -4810,6 +4822,13 @@ vue-loader@^16.0.0:
hash-sum "^2.0.0"
loader-utils "^2.0.0"

vue-router@^4.2.5:
version "4.4.5"
resolved "https://registry.npmjs.org/vue-router/-/vue-router-4.4.5.tgz#bdf535e4cf32414ebdea6b4b403593efdb541388"
integrity sha512-4fKZygS8cH1yCyuabAXGUAsyi1b2/o/OKgu/RUb+znIYOxPRxdkytJEx+0wGcpBE1pX6vUgh5jwWOKRGvuA/7Q==
dependencies:
"@vue/devtools-api" "^6.6.4"

vue-tsc@^2.1.6:
version "2.1.6"
resolved "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.1.6.tgz#d93fdc617da6546674301a746fd7089ea6d4543d"
Expand Down

0 comments on commit 91672b5

Please sign in to comment.