UNPKG

@neynar/ui

Version:

React UI component library built on shadcn/ui and Tailwind CSS

48 lines (38 loc) 1.14 kB
# AlertDialogCancel **Type**: component Cancel button of the alert dialog The button that dismisses the dialog without performing the action. Styled using outline variant by default to de-emphasize compared to the primary action. Closes the dialog when clicked without triggering the main action. ## JSX Usage ```jsx import { AlertDialogCancel } from '@neynar/ui'; <AlertDialogCancel asChild={true} className="value" /> ``` ## Component Props ### asChild - **Type**: `boolean` - **Required**: No - **Description**: Render as child element, merging props and behavior ### className - **Type**: `string` - **Required**: No - **Description**: Additional CSS classes for custom styling ## Examples ```tsx // Standard cancel buttons <AlertDialogCancel>Cancel</AlertDialogCancel> <AlertDialogCancel>No, keep it</AlertDialogCancel> <AlertDialogCancel>Go Back</AlertDialogCancel> // Custom styled cancel <AlertDialogCancel className="text-red-600"> Don't Delete </AlertDialogCancel> // Composition with custom button <AlertDialogCancel asChild> <Button variant="ghost" size="sm"> Maybe Later </Button> </AlertDialogCancel> ``` /