Skip to content

Commit

Permalink
fix(VToolbar): give proper default tag and allow for a custom one
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Jun 29, 2019
1 parent 186eec1 commit 47d56b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

exports[`AppBar.ts should render with background 1`] = `
<nav class="v-sheet v-sheet--tile theme--light v-toolbar v-app-bar"
style="margin-top: 0px; transform: translateY(0px); left: 0px; right: 0px;"
<header class="v-sheet v-sheet--tile theme--light v-toolbar v-app-bar"
style="margin-top: 0px; transform: translateY(0px); left: 0px; right: 0px;"
>
<div class="v-toolbar__image">
<div class="v-responsive v-image"
Expand All @@ -23,6 +23,6 @@ exports[`AppBar.ts should render with background 1`] = `
style="height: 64px;"
>
</div>
</nav>
</header>
`;
6 changes: 5 additions & 1 deletion packages/vuetify/src/components/VToolbar/VToolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default VSheet.extend({
type: Boolean,
default: true,
},
tag: {
type: String,
default: 'header',
},
},

data: () => ({
Expand Down Expand Up @@ -159,6 +163,6 @@ export default VSheet.extend({
if (this.isExtended) children.push(this.genExtension())
if (this.src || this.$scopedSlots.img) children.unshift(this.genBackground())

return h('nav', data, children)
return h(this.tag, data, children)
},
})
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`VToolbar.ts should render an extended toolbar 1`] = `
<nav class="v-sheet v-sheet--tile theme--light v-toolbar v-toolbar--extended">
<header class="v-sheet v-sheet--tile theme--light v-toolbar v-toolbar--extended">
<div class="v-toolbar__content"
style="height: 64px;"
>
Expand All @@ -11,13 +11,13 @@ exports[`VToolbar.ts should render an extended toolbar 1`] = `
style="height: 48px;"
>
</div>
</nav>
</header>
`;

exports[`VToolbar.ts should render an extended toolbar with specific height 1`] = `
<nav class="v-sheet v-sheet--tile theme--light v-toolbar v-toolbar--extended">
<header class="v-sheet v-sheet--tile theme--light v-toolbar v-toolbar--extended">
<div class="v-toolbar__content"
style="height: 64px;"
>
Expand All @@ -26,6 +26,6 @@ exports[`VToolbar.ts should render an extended toolbar with specific height 1`]
style="height: 42px;"
>
</div>
</nav>
</header>
`;

0 comments on commit 47d56b2

Please sign in to comment.