Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@easyguide/select

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easyguide/select

Components select ui

  • 0.9.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source
  • @easyguide/select

@easyguide/select

Camponents select ui

NPM JavaScript Style Guide

Install

npm install --save @easyguide/select

Usage simple select

import React, {Fragment} from 'react'
import Select from '@easyguide/select'

class Example extends Component {
  render() {
    const data = [{key: 1, value: 'Option 1'}, {key: 2, value: 'Option 2'}]

    return (
      <Fragment>
        <Select
          data={data}
          onChange={item => console.log(`value:${item.value}`)}
          render={item => (
            <div>
              <span>
                <img
                  style={{
                    marginRight: 10,
                    verticalAlign: 'bottom',
                  }}
                  width="20"
                  height="20"
                  src="https://cdn4.iconfinder.com/data/icons/48-bubbles/48/04.Bank-512.png"
                />
                <span>{item.value}</span>
              </span>
            </div>
          )}
          renderListItem={item => `${item.key} - ${item.value}`}
        />
      </Fragment>
    )
  }
}
import React, {Fragment} from 'react'
import Select from '@easyguide/select'

class Example extends Component {
  render() {
    const data = [{key: 1, value: 'Option 1'}, {key: 2, value: 'Option 2'}]

    return (
      <Fragment>
        <Select
          liveSearch
          data={data}
          placeholder="Digite uma opção"
          onChange={item => console.log(`value:${item.value}`)}
          renderListItem={item => `${item.key} - ${item.value}`}
          render={item => (
            <div>
              <span>
                <img
                  style={{
                    marginRight: 10,
                    verticalAlign: 'bottom',
                  }}
                  width="20"
                  height="20"
                  src="https://cdn4.iconfinder.com/data/icons/48-bubbles/48/04.Bank-512.png"
                />
                <span>{item.value}</span>
              </span>
            </div>
          )}
        />
      </Fragment>
    )
  }
}

License

MIT © iamtchelo

FAQs

Package last updated on 21 Jun 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc