Skip to content

Commit 8f69263

Browse files
committed
feat: add other tab example
1 parent 8eb9142 commit 8f69263

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

src/components/tabs/tabs.stories.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,27 @@ stories
3232
}), {
3333
info: {}
3434
})
35+
.add('without full width', () => ({
36+
data () {
37+
return {
38+
current: 1
39+
}
40+
},
41+
methods: {
42+
handleClick (e, tabIndex) {
43+
this.current = tabIndex
44+
}
45+
},
46+
components: { WTabs, WTab },
47+
template: `
48+
<div>
49+
<w-tabs backgroundColor="white" color="primary">
50+
<w-tab icon="clock" :active="current === 1" @click="handleClick($event, 1)">Recents</w-tab>
51+
<w-tab icon="map-marker" :active="current === 2" @click="handleClick($event, 2)">Nearby</w-tab>
52+
<w-tab icon="heart" :active="current === 3" @click="handleClick($event, 3)">Favorites</w-tab>
53+
</w-tabs>
54+
</div>
55+
`
56+
}), {
57+
info: {}
58+
})

0 commit comments

Comments
 (0)