@rhc-shared-components/form-checkbox
v4.0.2
Published
project description
Keywords
Readme
@rhc-shared-components/form-checkbox
Form checkbox component
Install
npm install --save @rhc-shared-components/form-checkboxUsage
import { Formik } from "formik";
import { FormCheckbox } from "@rhc-shared-components/form-checkbox";
const App = () => {
const fieldName = "allowedRepo";
return (
<Formik
initialValues={{
[fieldName]: false,
}}
enableReinitialize={true}
onSubmit={() => {}}
>
<FormCheckbox
id="allow-hosted-container-registry"
name={fieldName}
label=""
subLabel="I need Red Hat to host my registry"
/>
</Formik>
);
};Development
yarn dev # Start dev server
yarn build # Build library
yarn lint # Check with Biome
yarn lint-fix # Auto-fix with Biome