chore(Button): use ui prop for slots only

This commit is contained in:
Benjamin Canac
2024-03-06 16:29:03 +01:00
parent 66cf178cc3
commit 57c2cc0ef4

View File

@@ -27,7 +27,7 @@ export interface ButtonProps extends LinkProps {
padded?: boolean padded?: boolean
truncate?: boolean truncate?: boolean
class?: any class?: any
ui?: Partial<typeof appButton> ui?: Partial<typeof appButton.slots>
} }
export interface ButtonSlots { export interface ButtonSlots {
@@ -53,7 +53,10 @@ const forward = useForwardProps(reactiveOmit(props, 'type', 'label', 'color', 's
// Computed // Computed
const ui = computed(() => tv({ extend: appButton, ...props.ui })({ const ui = computed(() => tv({
extend: appButton,
slots: props.ui
})({
color: props.color, color: props.color,
size: props.size, size: props.size,
loading: props.loading, loading: props.loading,