import React from "react"; import { View } from "react-native"; import { Checkbox, type CheckboxProps, Label, cn } from "heroui-native"; export interface NCheckProps extends Omit { label?: string; /** Alias of `label`, so the same markup works against the React package. */ children?: React.ReactNode; /** Alias of `isSelected`. */ checked?: boolean; /** Alias of `onSelectedChange`. */ onChange?: (checked: boolean) => void; /** Alias of `isDisabled`. */ disabled?: boolean; containerClassName?: string; labelClassName?: string; } export const NCheck = React.memo( ({ label, children, checked, onChange, disabled, isSelected, isDisabled, onSelectedChange, containerClassName, labelClassName, ...props }) => { const text = label ?? children; const selected = checked ?? isSelected ?? false; const off = disabled ?? isDisabled ?? false; const change = onChange ?? onSelectedChange; return ( {text && ( )} ); }, ); NCheck.displayName = "NCheck";