New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rn-tagscroll

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-tagscroll

React Native Component for making Tag Scroll

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Installation

npm install --save rn-tagscroll

Usage

Example

import React, { Component } from 'react'
import RNTagScroll from 'rn-tagscroll'

export default Example extends Component {
  constructor(props) {
    super(props)

    this.state = {
      list: [{
        id: 0,
        name: 'All'
      }, {
        id: 1,
        name: 'Lorem'
      }, {
        id: 2,
        name: 'Ipsum'
      }, {
        id: 3,
        name: 'Dolor'
      }, {
        id: 4,
        name: 'Sit'
      }, {
        id: 5,
        name: 'Amet'
      }],
    
      selected: {
        id: 0,
        name: 'All'
      }
    }
  }

  onSelect = (selected) => {
    this.setState({ selected })
  }

  render() {
    const { list, selected } = this.state

    return (
      <RNTagScroll
        showScroll={true}
        list={list}
        selected={selected}
        showEmptyState={false}
        onItemPress={this.onSelect.bind(this)}
      />
    )
  }
}
PropDescriptionDefault
contentContainerStyleStyle for container tag scrolldefault styles
showEmptyStateRender empty state if no listfalse
emptyStateStyleStyle for empty statedefault styles
emptyTextLabel text for empty stateNo Data Available
emptyTextStyleStyle for empty label textdefault styles
showScrollShow scroll indicatortrue
listData list (Array of Object width key id and name)null
selectedSelected item list (Object)null
onItemPressWhen item list pressedundefined
itemWrapperStyleStyle for item list wrapperdefault styles
selectedItemWrapperStyleStyle for selected item list wrapperdefault styles
itemTextStyleStyle for item text/labeldefault styles
selectedItemTextStyleStyle for selected item text/labeldefault styles

Keywords

tag

FAQs

Package last updated on 08 Feb 2020

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