0.1.5 • Published 1 year ago

@rhc-shared-components/form-checkbox v0.1.5

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
1 year ago

@rhc-shared-components/form-checkbox

Form checkbox component

NPM JavaScript Style Guide

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