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

react-native-tabbedlist

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-tabbedlist

React Native Scrollable Tabbed List.

latest
Source
npmnpm
Version
0.1.8
Version published
Maintainers
0
Created
Source

react-native-tabbedlist

React Native Scrollable Tabbed List.

Installation

npm install react-native-tabbedlist

Usage

import { TabbedList } from 'react-native-tabbedlist';

// ...

 const DATA: Data[] = [
    {
      title: 'Section 1',
      data: ['Item 1-1', 'Item 1-2', 'Item 1-3'],
    },
    {
      title: 'Section 2',
      data: ['Item 2-1', 'Item 2-2', 'Item 2-3'],
    }
 ]

const renderListItem = (item: any) => {
    return (
      <View style={styles.listItem}>
        <Text>{item}</Text>
      </View>
    );
  };

  const renderTabItem = ({
    item,
    isSelected,
  }: {
    item: any;
    isSelected: boolean;
  }) => {
    return (
      <View style={styles.tabItem}>
        <Text style={isSelected && styles.selected}>{item.title}</Text>
      </View>
    );
  };

  const renderSectionHeader = (section: SectionListData<Data>) => {
    return (
      <View style={styles.sectionHeader}>
        <Text>{section.title}</Text>
      </View>
    );
  };

  const listHeader = (
    <View style={styles.header}>
      <Text>List Header</Text>
    </View>
  );



return (
    <TabbedList
        data={DATA}
        listHeader={listHeader}
        renderListItem={renderListItem}
        renderTabItem={renderTabItem}
        renderSectionHeader={renderSectionHeader}
    />;
)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with create-react-native-library

Keywords

react-native

FAQs

Package last updated on 11 Dec 2024

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