ksylvest/tights

View on GitHub
src/checkbox.tsx

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%
import type { ComponentProps, FC, ReactNode } from "react";

export const Checkbox: FC<
  ComponentProps<"input"> & { children: ReactNode }
> = ({ children, ...props }) => (
  <label className="checkbox">
    <input type="checkbox" {...props} /> {children}
  </label>
);