Skip to content

Commit

Permalink
feat(VExpansionPanelTitle): add dimension support
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Jun 12, 2024
1 parent 82a15dc commit 784eb14
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { VIcon } from '@/components/VIcon'
// Composables
import { useBackgroundColor } from '@/composables/color'
import { makeComponentProps } from '@/composables/component'
import { makeDimensionProps, useDimension } from '@/composables/dimensions'
import { IconValue } from '@/composables/icons'

// Directives
Expand Down Expand Up @@ -52,6 +53,7 @@ export const makeVExpansionPanelTitleProps = propsFactory({
readonly: Boolean,

...makeComponentProps(),
...makeDimensionProps(),
}, 'VExpansionPanelTitle')

export const VExpansionPanelTitle = genericComponent<VExpansionPanelTitleSlots>()({
Expand All @@ -67,6 +69,7 @@ export const VExpansionPanelTitle = genericComponent<VExpansionPanelTitleSlots>(
if (!expansionPanel) throw new Error('[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel')

const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(props, 'color')
const { dimensionStyles } = useDimension(props)

const slotProps = computed(() => ({
collapseIcon: props.collapseIcon,
Expand All @@ -92,6 +95,7 @@ export const VExpansionPanelTitle = genericComponent<VExpansionPanelTitleSlots>(
]}
style={[
backgroundColorStyles.value,
dimensionStyles.value,
props.style,
]}
type="button"
Expand Down

0 comments on commit 784eb14

Please sign in to comment.