Skip to content

Commit

Permalink
feat(VBtn/VTab): add text property
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The VTab title prop is now text
  • Loading branch information
johnleider committed Apr 18, 2023
1 parent d0b41e4 commit 753d444
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/vuetify/src/components/VBtn/VBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const makeVBtnProps = propsFactory({
default: true,
},

text: String,

...makeBorderProps(),
...makeRoundedProps(),
...makeDensityProps(),
Expand Down Expand Up @@ -228,8 +230,9 @@ export const VBtn = genericComponent<VBtnSlots>()({
icon: props.icon,
},
}}
v-slots:default={ slots.default }
/>
>
{ slots.default?.() ?? props.text }
</VDefaultsProvider>
)}
</span>

Expand Down
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VTabs/VTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const VTab = genericComponent()({

props: {
fixed: Boolean,
title: String,

sliderColor: String,
hideSlider: Boolean,
Expand Down Expand Up @@ -122,7 +121,8 @@ export const VTab = genericComponent()({
{ ...attrs }
onGroup:selected={ updateSlider }
>
{ slots.default ? slots.default() : props.title }
{ slots.default?.() ?? props.text }

{ !props.hideSlider && (
<div
ref={ sliderEl }
Expand Down

0 comments on commit 753d444

Please sign in to comment.