({ inputClassName, containerClassName, width, maxLength = 4, ...props }: GroupProps)
| 65 | }; |
| 66 | |
| 67 | const Group = ({ inputClassName, containerClassName, width, maxLength = 4, ...props }: GroupProps) => { |
| 68 | const { id, size, disabled } = usePinInputContext(); |
| 69 | |
| 70 | return ( |
| 71 | <OTPInput |
| 72 | {...props} |
| 73 | size={width} |
| 74 | maxLength={maxLength} |
| 75 | disabled={disabled} |
| 76 | id={"pin-input-" + id} |
| 77 | aria-label="Enter your pin" |
| 78 | aria-labelledby={"pin-input-label-" + id} |
| 79 | aria-describedby={"pin-input-description-" + id} |
| 80 | containerClassName={cx("flex flex-row", styles[size].group, containerClassName)} |
| 81 | className={cx("disabled:cursor-not-allowed", inputClassName)} |
| 82 | /> |
| 83 | ); |
| 84 | }; |
| 85 | Group.displayName = "Group"; |
| 86 | |
| 87 | const Slot = ({ index, className, ...props }: ComponentPropsWithRef<"div"> & { index: number }) => { |
nothing calls this directly
no test coverage detected