[fabric/core] Add variantConstructor utility for tagged variants
This commit is contained in:
parent
dd95d58e3a
commit
f189f8994f
@ -5,7 +5,7 @@ export function variantConstructor<
|
||||
>(
|
||||
tag: T[VariantTag],
|
||||
) {
|
||||
return <TOpts extends Omit<T, VariantTag>>(options: TOpts) => {
|
||||
return <TOpts extends Omit<T, VariantTag>>(options: TOpts = {} as TOpts) => {
|
||||
return {
|
||||
_tag: tag,
|
||||
...options,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user