1.2.3 • Published 5 years ago

custom-item-select v1.2.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

custom-item-select

The React component used to select options visualized by the HTML/React components.

NPM JavaScript Style Guide

Install

npm install --save custom-item-select

No additional dependencies, React only!

Demo

custom-item-select

Usage

import React, { Component } from 'react'
import Select from 'custom-item-select'

const items = [
  { key: "one", component: <Item>Custom item component</Item> },
  { key: "two", component: <Item>Custom item component 2</Item> },
  { key: "three", component: <AnotherItem>Three</AnotherItem> }
]

function() {
  const [value, setValue] = React.useState()
  return (
    <Select 
      items={items} 
      onSelect={(key) => setValue(key)} 
      placeholder="select one element..."
    />
  )
}

License

MIT © ktomecki

Made with create-react-library

1.2.3

5 years ago

1.2.2

5 years ago

1.2.0

5 years ago

1.2.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago