Feat: Verify the parameters of the begin operator #3221 (#7794)

### What problem does this PR solve?

Feat: Verify the parameters of the begin operator #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-22 16:58:47 +08:00
committed by GitHub
parent b6f3a6a68a
commit 02fd381072
8 changed files with 162 additions and 64 deletions

View File

@ -3,7 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
import * as React from 'react';
import { cn } from '@/lib/utils';
import { Loader2 } from 'lucide-react';
import { Loader2, Plus } from 'lucide-react';
const buttonVariants = cva(
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
@ -93,3 +93,18 @@ export const ButtonLoading = React.forwardRef<
ButtonLoading.displayName = 'ButtonLoading';
export { Button, buttonVariants };
export const BlockButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ children, className, ...props }, ref) => {
return (
<Button
variant={'outline'}
ref={ref}
className={cn('w-full border-dashed border-input-border', className)}
{...props}
>
<Plus /> {children}
</Button>
);
},
);