Socket
Socket
Sign inDemoInstall

react-native-components-kit

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-components-kit

A set of easy and highly customizable React Native components


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
63.0 kB
Created
Weekly downloads
 

Readme

Source

react-native-components-kit

NPM Package

A set of easy and highly customizable React Native components

Getting started

  • yarn add react-native-components-kit
  • npm install react-native-components-kit

Components

SummaryItems

It allows you to create a highly customizable and dynamic summary of items.

Example of usage

Usage

import { SummaryItems } from 'react-native-components-kit';

<SummaryItems
  containerStyle={{ marginHorizontal: 25 }}
  titleStyle={{ fontSize: 20 }}
  itemContainerStyle={{}}
  itemTitleStyle={{ fontSize: 16 }}
  itemValueStyle={{ fontWeight: 'bold' }}
  totalContainerStyle={{}}
  totalTitleStyle={{ fontSize: 18, fontWeight: 'bold' }}
  totalValueStyle={{ fontSize: 16, fontWeight: 'bold' }}
  title="Bill summary"
  items={[
    {
      containerStyle: {},
      titleStyle: {},
      valueStyle: {},
      title: 'Meat',
      value: '$10.00',
    },
    {
      title: 'Eggs',
      value: '$20.00',
    },
    {
      title: 'Fruits',
      value: '$12.00',
    },
  ]}
  total={{
    title: 'Total',
    value: '42.00',
  }}
/>

StepperContainer

It allows you to create a container wrapper for a stepper with the whole logic.

Usage

import { StepperContainer, useStepper } from 'react-native-components-kit';

function MyComponent() {
  const { goToNext, goToPrevious, goTo } = useStepper();
  return <MyStep />;
}

function MyStepper() {
  const steps = [
    {
      key: 'firstStep',
      component: ({ goToNext, goToPrevious, goTo, ...stepProps }) => MyComponent,
    },
    {
      key: 'secondStep',
      component: ({ goToNext, goToPrevious, goTo, ...stepProps }) => MyComponent,
    }
  ];

  return (
    <StepperContainer
      initialStep={1}
      onCancel={() => console.log('go to back pressed on the first step')}
      onSubmit={() => console.log('go to next pressed on the last step')}
      steps={steps}
      {...stepProps}
    />
  );
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Last updated on 21 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc