UNPKG

@conduction/components

Version:

React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)

4 lines (3 loc) 460 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import * as styles from "./Checkbox.module.css"; export const InputCheckbox = ({ name, validation, register, label, defaultChecked, disabled, }) => (_jsxs("div", { children: [_jsx("input", { type: "checkbox", id: `checkbox${name}`, defaultChecked, disabled, ...register(name, { ...validation }), className: styles.checkbox }), _jsx("label", { htmlFor: `checkbox${name}`, children: label })] }));