ksylvest/tights

View on GitHub
src/radio.tsx

Summary

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

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