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