Core/src/Components/Forms/Checkbox.tsx

14 lines
410 B
TypeScript
Raw Normal View History

2024-06-08 23:52:26 +02:00
import React from "react";
import {Check} from "@phosphor-icons/react";
export function Checkbox({children, type, ...inputProps}: React.PropsWithChildren<React.InputHTMLAttributes<HTMLInputElement>>): React.ReactElement
{
return (
<label className={"box"}>
<input type={"checkbox"} {...inputProps} />
<a className={"button"} tabIndex={-1}><Check weight={"bold"} /></a>
{children}
</label>
);
}