react-native-stepper-ui
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "react-native-stepper-ui", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Stepper Component for React Native", | ||
@@ -5,0 +5,0 @@ "main": "index.tsx", |
@@ -43,2 +43,36 @@ # react-native-stepper-ui | ||
```javascript | ||
import React, { useState } from "react"; | ||
import Stepper from "react-native-stepper-ui"; | ||
import { View, Alert, Text } from "react-native"; | ||
const MyComponent = (props) => { | ||
return ( | ||
<View> | ||
<Text>{props.title}</Text> | ||
</View> | ||
); | ||
}; | ||
const content = [ | ||
<MyComponent title="Component 1" />, | ||
<MyComponent title="Component 2" />, | ||
<MyComponent title="Component 3" />, | ||
]; | ||
const App = () => { | ||
const [active, setActive] = useState(0); | ||
return ( | ||
<View style={{ marginVertical: 80, marginHorizontal: 20 }}> | ||
<Stepper | ||
active={active} | ||
content={content} | ||
onNext={() => setActive((p) => p + 1)} | ||
onBack={() => setActive((p) => p - 1)} | ||
onFinish={() => Alert.alert("Finish")} | ||
/> | ||
</View> | ||
); | ||
}; | ||
export default App; | ||
``` | ||
## Props | ||
@@ -45,0 +79,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12771
6
223
92