@rhc-shared-components/form-select-component
v2.0.2
Published
project description
Keywords
Readme
@rhc-shared-components/form-select-component
Form select component with Formik integration and PatternFly styling.
Install
npm install --save @rhc-shared-components/form-select-componentUsage
import {
FormSelect,
type ISelectItem,
} from "@rhc-shared-components/form-select-component";
import { Form, Formik } from "formik";
const options: ISelectItem[] = [
{ value: "Accounting" },
{ value: "API Management" },
{ value: "Application Delivery" },
];
const App = () => {
return (
<Formik
initialValues={{ businessType: "" }}
enableReinitialize={true}
onSubmit={() => {}}
>
<Form>
<FormSelect
name="businessType"
label="Types of business"
placeholder="Select"
selectOptions={options}
isRequired
/>
</Form>
</Formik>
);
};Development
yarn dev # Start dev server
yarn build # Build library
yarn lint # Check with Biome
yarn lint-fix # Auto-fix with Biome