@rhc-shared-components/form-checkbox
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @rhc-shared-components/form-checkbox

Weekly Downloads

7

Version

0.1.5

License

MIT

Unpacked Size

10.8 kB

Total Files

10

Last publish

Collaborators

  • eyevana
  • kipatil-1
  • shkale
  • bdone
  • gkr-redhat