Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 4355x 6295x | import type React from "react";
import { Checkbox as CheckboxRaw } from "@heroui/react";
export type Props = {
className?: string;
isSelected?: boolean;
onValueChange?: (nextSelected: boolean) => void;
isIndeterminate?: boolean;
isDisabled?: boolean;
color?: React.ComponentProps<typeof CheckboxRaw>["color"];
icon?: React.ReactNode;
size?: React.ComponentProps<typeof CheckboxRaw>["size"];
children?: string;
testID?: string;
};
export const Checkbox: React.FC<Props> = ({
children,
testID = "checkbox",
...props
}) => (
<CheckboxRaw
{...props}
classNames={children ? undefined : { wrapper: "me-0" }}
data-testid={testID}
>
{children}
</CheckboxRaw>
);
|