🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@rhc-shared-components/form-select-component

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhc-shared-components/form-select-component

project description

latest
npmnpm
Version
0.2.7
Version published
Maintainers
0
Created
Source

@rhc-shared-components/sample-project

project description

NPM JavaScript Style Guide

Install

npm install --save @rhc-shared-components/form-select-component

Usage

import React from 'react';

import {
  FormSelect,
  ISelectItem
} from '@rhc-shared-components/form-select-component';
import { Form, Formik } from 'formik';

const App = () => {
  const FieldName = 'form multi select';
  const options = [
    'Accounting',
    'API Management',
    'Application Delivery',
    'Application Server',
    'Automation',
    'Backup & Recovery',
    'Business Intelligence',
    'Business Process Management',
    'Capacity Management'
  ];
  const getActions = () => {
    const getAllOptions: ISelectItem[] = options.map((item) => ({
      value: item
    }));
    return getAllOptions;
  };

  return (
    <Formik
      initialValues={{
        [FieldName]: 'test'
      }}
      enableReinitialize={true}
      onSubmit={() => {}}
    >
      <Form>
        <FormSelect
          name={FieldName}
          label='Types of business'
          placeholder='Select'
          selectOptions={getActions()}
          isRequired
        />
      </Form>
    </Formik>
  );
};

export default App;

License

MIT © authorGithubUsername

FAQs

Package last updated on 28 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts