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-multi-steps

v0.1.8

Published

This component aimed to enable navigating from it's child component using multi step approach which will help in creating multi step forms, viewing item by item etc..

Downloads

106

Readme

react-native-multi-steps

This component aimed to enable navigating from it's child component using multi step approach which will help in creating multi step forms, viewing item by item etc..

The new version of react-native-multi-steps now support conditional rendering.

Preview

Installation

npm install react-native-multi-steps

Usage

NB: buttonstyle is deprecated from this verison.

It will be replaced by nextButtonStyle, previousButtonStyle and submitButtonStyle. This change will Developers to have controll on how they want to customize each and every button. All thanks to Anand Kumar our new contributor

props

| Props | Optional | Type | Description | | ---------------------- | -------- | ------------- | ------------------------------------------------------------------------------ | | containerStyle | Yes | Object | Used to style the components container | | containerButtonStyle | Yes | Object | Used to style the button container | | buttonStyle | Yes | Object | Used to style the button Deprecated | | prevButtonStyle | Yes | Object | Used to style the button | | nextButtonStyle | Yes | Object | Used to style the button | | submitButtonStyle | Yes | Object | Used to style the button | | buttonLabelStyle | Yes | Object | Used to style the button label | | onMoveNext | No | function | Moving to the next child view | | onMovePrevious | No | function | Moving to the previous child view | | onSubmit | Yes | function | Called on submit only when the function is available as a property | | config | Yes | Object | Config buttons label to your specification eg: rename button |

import MultiSteps from "react-native-multi-steps";

// ...

//Simple implementation
<MultiSteps 
//Move to the next item
onMoveNext={(data)=>{console.log(data) }} 
//Move to the previous item 
onMovePrevious={(data)=>{console.log(data)}} 
/>

//Whever you need to implement onSubmit
<MultiSteps 
//Move to the next item
onMoveNext={(data)=>{console.log(data) }} 
//Move to the previous item 
onMovePrevious={(data)=>{console.log(data)}} 
//onSubmit is optional, only implement it whever you need to use it
onSubmit={()=>{console.log('Submiting')}}
/>

//Implementation with config object
<MultiSteps 
//Move to the next item
onMoveNext={(data)=>{console.log(data) }} 
//Move to the previous item 
onMovePrevious={(data)=>{console.log(data)}} 
//onSubmit is optional, only implement it whever you need to use it
onSubmit={()=>{console.log('Submiting')}}
config ={{
   nextButtonLabel: 'Next Section',
    previousButtonLabel: 'Previous Section',
    submitButtonLabel: 'Done'
}}
/>

Example

import { StyleSheet, View, Text } from 'react-native';
import MultiSteps from 'react-native-multi-steps';

export default function App() {

  return (
    <View style={styles.container}>
      <MultiSteps
        containerButtonStyle={styles.containerButtonStyle}
        onMoveNext={function (data: any): void { console.log("next", data) }}
        onMovePrevious={function (data: any): void { console.log("previous", data) }}
        onSubmit={function () { console.log('Submit') }}>
        <View>
          <Text>
            A paragraph is a series of related sentences developing a central idea, called the topic. Try to think about paragraphs in terms of thematic unity: a paragraph is a sentence or a group of sentences that supports one central, unified idea. Paragraphs add one idea at a time to your broader argument.
           </Text>
        </View>
        {show && (
        <View>
          <Text style={{ fontSize: 30, fontWeight: 'bold' }}>
            Show this section
          </Text>
          <Text>
            Piedmont, or mountain, glaciers are found in many parts of the 
            world. In North America they are distributed along the mountain
            ranges of the Pacific Coast from central California northward. They
            abound in the Andes range in South America and are familiar and
            greatly admired spectacles in the Alps, the Pyrenees, the Caucasus
            Mountains and the mountains of Scandanavia. Rivers of ice flow down
            the valleys of various Asian mountain ranges, including the
            Himalayas, the Hindu Kush, and the Karakoram and Kunlun ranges. They
            are also a feature of the Southern Alps of New Zealand and are found
            in the lofty mountains of New Guinea. The largest piedmont glaciers
            are the Malaspina and Bering glaciers, both in Alaska.
          </Text>
        </View>
        )}
        <View>
          <Text>
            Piedmont, or mountain, glaciers are found in many parts of the world. In North America they are distributed along the mountain ranges of the Pacific Coast from central California northward. They abound in the Andes range in South America and are familiar and greatly admired spectacles in the Alps, the Pyrenees, the Caucasus Mountains and the mountains of Scandanavia. Rivers of ice flow down the valleys of various Asian mountain ranges, including the Himalayas, the Hindu Kush, and the Karakoram and Kunlun ranges. They are also a feature of the Southern Alps of New Zealand and are found in the lofty mountains of New Guinea. The largest piedmont glaciers are the Malaspina and Bering glaciers, both in Alaska. </Text>
        </View>
        <View>
          <Text>
            Scientists' research has revealed that viruses are by far the most abundant life forms on Earth. There are a million times more viruses on the planet than stars in the universe. Viruses also harbor the majority of genetic diversity on Earth. Scientists are finding evidence of viruses as a planetary force, influencing the global climate and geochemical cycles. They have also profoundly shaped the evolution of their hosts. The human genome, for example, contains 100,000 segments of virus DNA.
          </Text>
        </View>
        <View>
          <Text>
            sibusiso love you
          </Text>
        </View>
        <View>
          <Text>
            Scientists' research has revealed that viruses are by far the most abundant life forms on Earth. There are a million times more viruses on the planet than stars in the universe. Viruses also harbor the majority of genetic diversity on Earth. Scientists are finding evidence of viruses as a planetary force, influencing the global climate and geochemical cycles. They have also profoundly shaped the evolution of their hosts. The human genome, for example, contains 100,000 segments of virus DNA.
          </Text>
        </View>
      </MultiSteps>

    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    margin: 20,
  },
 containerButtonStyle:{
          display: 'flex',
          flexDirection: 'row',
          justifyContent: 'flex-end',
          paddingLeft: 10,
          paddingRight: 30,
        }
});

Contributing

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

License

MIT