Feat: Use storybook to display public components. #9914 (#9915)

### What problem does this PR solve?
Feat: Use storybook to display public components. #9914
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-09-04 17:03:36 +08:00
committed by GitHub
parent 483f3aa71d
commit aa1251af9a
34 changed files with 3974 additions and 225 deletions

View File

@ -65,24 +65,14 @@ Button.displayName = 'Button';
export const ButtonLoading = React.forwardRef<
HTMLButtonElement,
ButtonProps & { loading?: boolean }
Omit<ButtonProps, 'asChild'> & { loading?: boolean }
>(
(
{
className,
variant,
size,
asChild = false,
children,
loading = false,
disabled,
...props
},
{ className, variant, size, children, loading = false, disabled, ...props },
ref,
) => {
const Comp = asChild ? Slot : 'button';
return (
<Comp
<Button
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
@ -90,7 +80,7 @@ export const ButtonLoading = React.forwardRef<
>
{loading && <Loader2 className="animate-spin" />}
{children}
</Comp>
</Button>
);
},
);