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

fix(VListItem): subtitle wrong font #18720

Merged
merged 4 commits into from
Nov 28, 2023
Merged
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
12 changes: 6 additions & 6 deletions packages/vuetify/src/components/VCard/VCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export const makeVCardProps = propsFactory({
type: [Boolean, Object] as PropType<RippleDirectiveBinding['value']>,
default: true,
},
subtitle: String,
text: String,
title: String,
subtitle: [String, Number],
text: [String, Number],
title: [String, Number],

...makeBorderProps(),
...makeComponentProps(),
Expand Down Expand Up @@ -113,14 +113,14 @@ export const VCard = genericComponent<VCardSlots>()({

useRender(() => {
const Tag = isLink.value ? 'a' : props.tag
const hasTitle = !!(slots.title || props.title)
const hasSubtitle = !!(slots.subtitle || props.subtitle)
const hasTitle = !!(slots.title || props.title != null)
const hasSubtitle = !!(slots.subtitle || props.subtitle != null)
const hasHeader = hasTitle || hasSubtitle
const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon)
const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon)
const hasImage = !!(slots.image || props.image)
const hasCardItem = hasHeader || hasPrepend || hasAppend
const hasText = !!(slots.text || props.text)
const hasText = !!(slots.text || props.text != null)

return (
<Tag
Expand Down
8 changes: 4 additions & 4 deletions packages/vuetify/src/components/VCard/VCardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export const makeCardItemProps = propsFactory({
appendIcon: IconValue,
prependAvatar: String,
prependIcon: IconValue,
subtitle: String,
title: String,
subtitle: [String, Number],
title: [String, Number],

...makeComponentProps(),
...makeDensityProps(),
Expand All @@ -43,8 +43,8 @@ export const VCardItem = genericComponent<VCardItemSlots>()({
const hasPrepend = !!(hasPrependMedia || slots.prepend)
const hasAppendMedia = !!(props.appendAvatar || props.appendIcon)
const hasAppend = !!(hasAppendMedia || slots.append)
const hasTitle = !!(props.title || slots.title)
const hasSubtitle = !!(props.subtitle || slots.subtitle)
const hasTitle = !!(props.title != null || slots.title)
const hasSubtitle = !!(props.subtitle != null || slots.subtitle)

return (
<div
Expand Down
12 changes: 6 additions & 6 deletions packages/vuetify/src/components/VList/VListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ type ListItemSlot = {
}

export type ListItemTitleSlot = {
title?: string | number | boolean
title?: string | number
}

export type ListItemSubtitleSlot = {
subtitle?: string | number | boolean
subtitle?: string | number
}

export type VListItemSlots = {
Expand Down Expand Up @@ -82,8 +82,8 @@ export const makeVListItemProps = propsFactory({
default: true,
},
slim: Boolean,
subtitle: [String, Number, Boolean],
title: [String, Number, Boolean],
subtitle: [String, Number],
title: [String, Number],
value: null,

onClick: EventProp<[MouseEvent]>(),
Expand Down Expand Up @@ -179,8 +179,8 @@ export const VListItem = genericComponent<VListItemSlots>()({

useRender(() => {
const Tag = isLink.value ? 'a' : props.tag
const hasTitle = (slots.title || props.title)
const hasSubtitle = (slots.subtitle || props.subtitle)
const hasTitle = (slots.title || props.title != null)
const hasSubtitle = (slots.subtitle || props.subtitle != null)
const hasAppendMedia = !!(props.appendAvatar || props.appendIcon)
const hasAppend = !!(hasAppendMedia || slots.append)
const hasPrependMedia = !!(props.prependAvatar || props.prependIcon)
Expand Down
8 changes: 4 additions & 4 deletions packages/vuetify/src/components/VStepper/VStepperItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export type StepperItemSlot = {
canEdit: boolean
hasError: boolean
hasCompleted: boolean
title?: string
subtitle?: string
title?: string | number
subtitle?: string | number
step: any
}

Expand Down Expand Up @@ -115,8 +115,8 @@ export const VStepperItem = genericComponent<VStepperItemSlots>()({
!hasError.value &&
!props.disabled
)
const hasTitle = !!(props.title || slots.title)
const hasSubtitle = !!(props.subtitle || slots.subtitle)
const hasTitle = !!(props.title != null || slots.title)
const hasSubtitle = !!(props.subtitle != null || slots.subtitle)

function onClick () {
group?.toggle()
Expand Down
Loading