import React from "react";
import {Check} from "@phosphor-icons/react";
import {classes} from "../../Utils";

export function Radio({children, className, type, ...inputProps}: React.PropsWithChildren<React.InputHTMLAttributes<HTMLInputElement>>): React.ReactElement
{
	return (
		<label className={classes("box", className)}>
			<input type={"radio"} {...inputProps} />
			<a className={"button"} tabIndex={-1}><Check weight={"bold"} /></a>
			{children}
		</label>
	);
}
