Skip to content

Commit

Permalink
feat(VSelectionControl): add base-color support
Browse files Browse the repository at this point in the history
closes #7284
  • Loading branch information
johnleider committed Jul 24, 2023
1 parent 5290bfc commit 5657a1e
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export type VSelectionControlSlots = {

export const makeSelectionControlProps = propsFactory({
label: String,
baseColor: String,
trueValue: null,
falseValue: null,
value: null,
Expand Down Expand Up @@ -105,11 +106,9 @@ export function useSelectionControl (
},
})
const { textColorClasses, textColorStyles } = useTextColor(computed(() => {
return (
model.value &&
!props.error &&
!props.disabled
) ? props.color : undefined
if (props.error || props.disabled) return undefined

return model.value ? props.color : props.baseColor
}))
const icon = computed(() => model.value ? props.trueIcon : props.falseIcon)

Expand Down

0 comments on commit 5657a1e

Please sign in to comment.