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

ReactNative-checkbox

v1.0.4

Published

Checkbox and Checkbox List Components for React Native

Downloads

14

Readme

ReactNative-checkbox

Checkbox and CheckboxList Components for React Native. Components uses MaterialIcons from https://github.com/oblador/react-native-vector-icons.

Installation

npm i ReactNative-checkbox --save

iOS

  • Browse to node_modules/react-native-vector-icons and drag the folder Fonts (or just the ones you want) to your project in Xcode.

  • Edit Info.plist and add:

<key>UIAppFonts</key>
<array>
  <string>Entypo.ttf</string>
  <string>EvilIcons.ttf</string>
  <string>FontAwesome.ttf</string>
  <string>Foundation.ttf</string>
  <string>Ionicons.ttf</string>
  <string>MaterialIcons.ttf</string>
  <string>Octicons.ttf</string>
  <string>Zocial.ttf</string>
</array>

Usage:

import {Checkbox, CheckboxList } from 'ReactNative-checkbox';

render() {
  const Items = [
    {name: 'Item1', done: true},
    {name: 'Item2', done: true},
    {name: 'Item4', done: false}
  ];

  return (
    <View style={styles.container}>
      <CheckboxList
        data={Items}
        checked='done'
        iconColor='#4078c0'
        iconChecked='check-box'
        iconUnchecked='check-box-outline-blank'
      />
    </View>
  );
}

Example

#Props:

Checkbox

  • checked : Boolean
  • iconUnchecked : Name for unchecked icon from MaterialIcons (https://design.google.com/icons/) ex. "radio-button-unchecked".
  • iconChecked : Name for checked icon from MaterialIcons (https://design.google.com/icons/) ex. "radio-button-checked".
  • iconColor : String ex. "#305dc1".
  • iconSize : Number
  • text : Text that will be displayed along the checkbox.
  • textSize : Number - fontSize value.
  • onChange : Function that will be executed after click on checkbox.
  • checkboxStyles : StyleSheet abstraction ex. { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center'}
  • iconStyles : StyleSheet abstraction ex. { marginRight: 5 }

CheckboxList

  • checked : String - Name of the object property which stands for checked (boolean).
  • name : String - Name of the object property which stands for name. It will be displayed along the checkbox.
  • data : Array of objects ex. [{name: 'Female', checked: true}, {name: 'Male', checked: false}]
  • iconUnchecked : Name for unchecked icon from MaterialIcons (https://design.google.com/icons/) ex. "radio-button-unchecked".
  • iconChecked : Name for checked icon from MaterialIcons (https://design.google.com/icons/) ex. "radio-button-checked".
  • iconColor : String ex. "#305dc1".
  • iconSize : Number
  • textSize : Number - fontSize value.
  • onChange : Function that will be executed after click on checkbox.
  • checkboxStyles : StyleSheet abstraction ex. { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center'}
  • iconStyles : StyleSheet abstraction ex. { marginRight: 5 }
  • checkboxListStyles : StyleSheet abstraction ex. { flex: 1 }