@rhc-shared-components/form-checkbox
v1.0.0
Published
project description
Downloads
32
Keywords
Readme
@rhc-shared-components/form-checkbox
Form checkbox component
Install
npm install --save @rhc-shared-components/form-checkbox
Usage
import React from 'react';
import { Formik } from 'formik';
import { FormCheckbox } from '@rhc-shared-components/form-checkbox'
const App = () => {
const FieldName = 'allowedRepo'
return (
<Formik
initialValues={{
[FieldName]: ''
}}
enableReinitialize={true}
onSubmit={() => {
}}>
<FormCheckbox
id="allow-hosted-container-registry"
data-testid="allow-hosted-container-registry"
name={FieldName}
label=""
helperText={"I need Red Hat to host my registry"}
/>
</Formik>
)
}
export default App;
License
MIT © authorGithubUsername