From 753d444ebb1884b46479da6daf27be9b50de4f64 Mon Sep 17 00:00:00 2001 From: John Leider Date: Tue, 18 Apr 2023 15:20:02 -0500 Subject: [PATCH] feat(VBtn/VTab): add text property BREAKING CHANGE: The VTab title prop is now text --- packages/vuetify/src/components/VBtn/VBtn.tsx | 7 +++++-- packages/vuetify/src/components/VTabs/VTab.tsx | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/vuetify/src/components/VBtn/VBtn.tsx b/packages/vuetify/src/components/VBtn/VBtn.tsx index aa8ac687b0a..2cb6615c337 100644 --- a/packages/vuetify/src/components/VBtn/VBtn.tsx +++ b/packages/vuetify/src/components/VBtn/VBtn.tsx @@ -65,6 +65,8 @@ export const makeVBtnProps = propsFactory({ default: true, }, + text: String, + ...makeBorderProps(), ...makeRoundedProps(), ...makeDensityProps(), @@ -228,8 +230,9 @@ export const VBtn = genericComponent()({ icon: props.icon, }, }} - v-slots:default={ slots.default } - /> + > + { slots.default?.() ?? props.text } + )} diff --git a/packages/vuetify/src/components/VTabs/VTab.tsx b/packages/vuetify/src/components/VTabs/VTab.tsx index 9aef91da524..c6970fa87f9 100644 --- a/packages/vuetify/src/components/VTabs/VTab.tsx +++ b/packages/vuetify/src/components/VTabs/VTab.tsx @@ -21,7 +21,6 @@ export const VTab = genericComponent()({ props: { fixed: Boolean, - title: String, sliderColor: String, hideSlider: Boolean, @@ -122,7 +121,8 @@ export const VTab = genericComponent()({ { ...attrs } onGroup:selected={ updateSlider } > - { slots.default ? slots.default() : props.title } + { slots.default?.() ?? props.text } + { !props.hideSlider && (