@stephane1920/ts-dropdown-react
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

Dropdown menu.

made-with-node made-with-react made-with-sass GitHub repo size GitHub jest

A simple customizable react dropdown in typescript.
From project 14 OpenClassrooms, react app developer

Projet 14 Openclassroms
Demo

Installation

npm install @stephane1920/ts-dropdown-react
or
yarn add @stephane1920/ts-dropdown-react

Usage

import React from 'react';
import ReactDOM from 'react-dom/client';
import Dropdown from '@stephane1920/ts-dropdown-react';

const SomeComponent = () => {
  return (
    <div>
      <Dropdown 
        label='choicies'
        name='input-name'
        choicies={['option1','option2','option3','option4','option5']}
      />
    </div>
  )
};

Props

Label Type Required Default
label string Yes N/A
name string Yes N/A
zIndex number No 1
choicies string[ ] Yes N/A
error boolean No false
value string No ''
textColor string No '#70757A'
focusColor string No '#059ECE'
errorColor string No '#EF6C6C'
borderColor string No '#DADCE0'
borderRadius string No '5px'
onSelect callback() No N/A

License

ISC

Package Sidebar

Install

npm i @stephane1920/ts-dropdown-react

Weekly Downloads

1

Version

1.3.2

License

ISC

Unpacked Size

19.4 kB

Total Files

6

Last publish

Collaborators

  • stephane1920