-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24.02.54: wt-tabs wide prop + docs [WTEL-3899]
- Loading branch information
Showing
5 changed files
with
81 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,45 @@ | ||
<script setup> | ||
import Docs from './wt-tabs-docs.vue'; | ||
import ExampleTabs from './examples/example-tabs.vue'; | ||
import ExampleWideTabs from './examples/example-wide-tabs.vue'; | ||
</script> | ||
|
||
# WtTabs | ||
|
||
## Props | ||
::: raw | ||
<Docs /> | ||
::: | ||
|
||
| Name | Type | Default | Description | | ||
|---------|----------|---------|-----------------------------------------------| | ||
| current | `Object` | `{}` | The value of the selected tab | | ||
| tabs | `Array` | `[]` | The list of tabs. Tracked by `value` property | | ||
|
||
## Events | ||
|
||
| Name | Params | Description | | ||
|--------|-----------------|--------------------------------------| | ||
| change | `tab`: `Object` | Returns tab object from list of tabs | | ||
|
||
## Slots | ||
|
||
| Name | Scope | Description | | ||
|--------------|--------------------|--------------------------------------------------------------------------| | ||
| `:tab-value` | `{ tab, current }` | Override tab contents with passed tab from `tabs` object and `current` tab | | ||
|
||
## Example Tabs | ||
|
||
::: raw | ||
<ExampleTabs /> | ||
::: | ||
|
||
::: details Code | ||
<<< ./examples/example-tabs.vue | ||
::: | ||
|
||
## Example Wide Tabs | ||
|
||
::: raw | ||
<ExampleWideTabs /> | ||
::: | ||
|
||
::: details Code | ||
<<< ./examples/example-wide-tabs.vue | ||
::: |
33 changes: 33 additions & 0 deletions
33
docs/pages/webitel-ui/components/wt-tabs/examples/example-wide-tabs.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const tabs = [ | ||
{ | ||
text: 'Tab 1', | ||
value: '1', | ||
}, | ||
{ | ||
text: 'Tab 2', | ||
value: '2', | ||
}, | ||
{ | ||
text: 'Tab 3', | ||
value: '3', | ||
}, | ||
]; | ||
const current = ref(tabs[0]); | ||
</script> | ||
|
||
<template> | ||
<wt-tabs | ||
:current="current" | ||
:tabs="tabs" | ||
wide | ||
@change="current = $event" | ||
/> | ||
</template> | ||
|
||
<style scoped lang="scss"> | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters