npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-select-two-picker-color

v1.1.2

Published

Component like Select2 on web for React Native with color customization

Downloads

2

Readme

react-native-select-two-picker-color

Component like Select2 on web for React Native

Single select

Add it to your project

  • Using NPM npm install react-native-select-two-picker-color
  • or:
  • Using Yarn yarn add react-native-select-two-picker-color

Install dependencies

  1. react-native-modal
  2. react-native-vector-icons

Usage

import React, { Component } from "react"
import { View, Text, StyleSheet } from "react-native"
import Select2 from "react-native-select-two-picker-color"

const mockData = [
  { id: 1, name: "React Native Developer", checked: true, color: '#096' }, // set default checked for render option item
  { id: 2, name: "Android Developer" },
  { id: 3, name: "iOS Developer", color: '#f00' }
]

// create a component
class CreateNewAppointment extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Select2
          isSelectSingle
          style={{ borderRadius: 5 }}
          colorTheme="blue"
          popupTitle="Select item"
          title="Select item"
          data={mockData}
          onSelect={data => {
            this.setState({ data })
          }}
          onRemoveItem={data => {
            this.setState({ data })
          }}
        />
      </View>
    )
  }
}

Multiple select

Multiple select

Properties

| Property name | Type | Default | Description | | ------------------------- | -------------- | ------------------------------- | ------------------------------------------------------------------------------------------- | | style | Object | none | Custom style for component | | modalStyle | Object | none | Custom style for modal | | title | String | none | String display when you don't select any item | | data | Array | *required | Datasource of list options: an array of objects (each object have name and id property) | | onSelect | Function | none | The callback function trigger after you press select button | | onRemoveItem | Function | none | The callback function trigger after you press tags to remove them | | popupTitle | String | none | Title of modal select item | | colorTheme | string/color | #16a45f | Color for componet | | isSelectSingle | Bool | false | Selelect only one option | | showSearchBox | Bool | true | Show or hide search field | | cancelButtonText | string | Hủy | Cancel button text title | | selectButtonText | String | Chọn | Select button text title | | searchPlaceHolderText | String | Nhập vào từ khóa | Placeholder text for search field | | listEmptyTitle | String | Không tìm thấy lựa chọn phù hợp | Title to show when there's no item to be render | | defaultFontName | String | none | Set custom font for all component | | selectedTitleStyle | Object | none | Set custom style for display selected title text | | buttonTextStyle | Object | none | Set custom button text style | | buttonStyle | Object | none | Set custom button style |

MIT Licensed