Skip to content

Commit

Permalink
Merge pull request #1333 from dpc-sdp/bugfix/tab-story
Browse files Browse the repository at this point in the history
fix: update tabs story so tabs can be clicked
  • Loading branch information
dylankelly authored Sep 23, 2024
2 parents 0243bda + 8f8b2f8 commit c09ca7d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/ripple-ui-core/src/components/tabs/RplTabs.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ import {
Story,
ArgsTable
} from '@storybook/addon-docs'
import { ref } from 'vue'
import RplTabs from './RplTabs.vue'
import { a11yStoryCheck } from './../../../stories/interactions.js'

export const SingleTemplate = (args) => ({
components: { RplTabs },
setup() {
return { args }
const activeTab = ref('default')

const handleTabChange = ({ key }) => activeTab.value = key

return { args, activeTab, handleTabChange }
},
template: '<RplTabs v-bind="args" /><div id="panel-default"></div><div id="panel-extra"></div><div id="panel-more"></div>'
template: '<RplTabs v-bind="args" :activeTab="args?.activeTab || activeTab" @toggleTab="handleTabChange" /><div id="panel-default"></div><div id="panel-extra"></div><div id="panel-more"></div>'
})

<Meta
Expand Down Expand Up @@ -53,7 +58,6 @@ export const SingleTemplate = (args) => ({
icon: 'pin'
}
],
activeTab: 'default',
mode: 'horizontal'
}}
>
Expand All @@ -78,7 +82,6 @@ export const SingleTemplate = (args) => ({
icon: 'pin'
}
],
activeTab: 'default',
mode: 'vertical'
}}
>
Expand Down

0 comments on commit c09ca7d

Please sign in to comment.