Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 16 #20

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,61 @@ export default {
}
</script>
```
#### Adding is-boxed or is-toggled
To add the classes `is-boxed` or `is-toggled`, add the `boxed`
or `toggled` property to the tabs element.
```vue
<template>
<tabs animation="slide" boxed toggled>
<tab-pane label="Pictures">Pictures Tab</tab-pane>
<tab-pane label="Music">Music Tab</tab-pane>
<tab-pane label="Videos" selected>Video Tab</tab-pane>
<tab-pane label="Documents" disabled>Document Tab</tab-pane>
</tabs>
</template>

<script>
import { Tabs, TabPane } from 'vue-bulma-tabs'

export default {
components: {
Tabs,
TabPane
}
}
</script>
```

#### Centered toggle with icons

Using the `is-center` class with `is-toggled` and `is-fullwidth`

```vue
<template>
<tabs alignment="center" toggle size="large" isFullwidth>
<tab-pane icon="fa fa-image" label="Pictures">
Picture Content
</tab-pane>
<tab-pane icon="fa fa-music" label="Music">
Music Content
</tab-pane>
<tab-pane icon="fa fa-film" label="Film">
Film Content
</tab-pane>
</tabs>
</template>

<script>
import { Tabs, TabPane } from 'vue-bulma-tabs'

export default {
components: {
Tabs,
TabPane
}
}
</script>
```

## Badges

Expand Down
10 changes: 9 additions & 1 deletion src/Tabs.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div :class="{ 'vue-bulma-tabs': true, [`is-layout-${layout}`]: true }">
<div :class="{ tabs: true, [`is-${size}`]: size, [`is-${alignment}`]: alignment, [`is-${type}`]: type, 'is-fullwidth': isFullwidth }">
<div :class="{ tabs: true, 'is-boxed': boxed, 'is-toggle': toggle, [`is-${size}`]: size, [`is-${alignment}`]: alignment, [`is-${type}`]: type, 'is-fullwidth': isFullwidth }">
<slot name="left-tab-list"></slot>
<tab-list>
<li v-for="(tab, index) in tabPanes"
Expand Down Expand Up @@ -47,6 +47,14 @@ export default {
type: String,
default: ''
},
boxed: {
type: Boolean,
default: false
},
toggle: {
type: Boolean,
default: false
},
size: {
type: String,
default: ''
Expand Down