0.0.2 • Published 4 years ago

react-native-steps-wizard v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

react-native-steps-wizard

A react-native implementation of steps bar wizard indicator

Installation

npm i react-native-steps-wizard

Usage

class Example extends Component {
 routes = [
   {
     'Shipping': () => <ExampleComponent message="Test #1" />,
     'nextAction': () => this.doSomething('hello world!'),
     'previousAction': () => this.doSomething('back to previous view #1')
   },
   {
     'Payment': () => <ExampleComponent message="Test #2" />,
     'nextAction': () => this.doSomething('hello world #2!'),
     'previousAction': () => this.doSomething('back to previous view #2')
   },
   {
     'Confirm': () => <ExampleComponent message="Test #3" />,
     'nextAction': () => this.doSomething('hello world #3!'),
     'previousAction': () => this.doSomething('back to previous view #3')
   }
 ];
 
 customStyle = {/*Here your styles properties */}

 doSomething(text = 'do something...') {
   console.log(text);
 }

 render() {
   return (
     <View>
       <Steps stepsStyle={customStyle}
              steps={this.routes} />
     </View>
   );
 }
}

src/example/index.js

Properties

NameTypeDescription
stepsTitlesArrayList all steps to be shown
stepsStyleObjectCustom styling

Styles Properties

NameTypeDefault
labelColorString#FFFFFF #FFFFFF
stepsBackgroundColorString#2E81D3 #2E81D3
stepsBorderColorString#2E81D3 #2E81D3
currentStepBorderColorString#2E81D3 #2E81D3
currentStepBackgroundColorString#FFFFFF #FFFFFF
currentStepLabelColorString#2E81D3 #2E81D3