Add default as prop type for when as= is not provided

This commit is contained in:
Ryan Gossiaux
2022-02-09 15:44:38 -08:00
parent 42d792e72c
commit d7f6a58753
33 changed files with 63 additions and 54 deletions

View File

@@ -2,7 +2,7 @@
type TSwitchProps<
TSlotProps extends {},
TAsProp extends SupportedAs
> = TPassThroughProps<TSlotProps, TAsProp> & {
> = TPassThroughProps<TSlotProps, TAsProp, "button"> & {
checked: boolean;
};
</script>