Skip to content

Commit c36c1ee

Browse files
Update README.md
1 parent 864cdb3 commit c36c1ee

File tree

1 file changed

+7
-106
lines changed

1 file changed

+7
-106
lines changed

README.md

Lines changed: 7 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
A simple and full customizable React Native package which implements a unique slider.
1111
</p>
1212
<p align="center">
13-
<img src="https://github.com/RichardRNStudio/react-native-slider-intro/blob/main/docs/basic-example.gif?raw=true" height="400"/>
14-
<img src="https://github.com/RichardRNStudio/react-native-slider-intro/blob/main/docs/custom-buttons-example.gif?raw=true" height="400"/>
15-
<img src="https://github.com/RichardRNStudio/react-native-slider-intro/blob/main/docs/column-buttons-example.gif?raw=true" height="400"/>
13+
<img src="https://github.com/RichardRNStudio/react-native-slider-intro/blob/main/docs/basic-example.gif?raw=true" height="350"/>
14+
<img src="https://github.com/RichardRNStudio/react-native-slider-intro/blob/main/docs/custom-buttons-example.gif?raw=true" height="350"/>
15+
<img src="https://github.com/RichardRNStudio/react-native-slider-intro/blob/main/docs/column-buttons-example.gif?raw=true" height="350"/>
1616
</p>
1717

1818
<h2>Installation</h2>
@@ -53,6 +53,7 @@ const slides = [
5353
index: 1,
5454
title: 'First step',
5555
text: 'Simple description.',
56+
link: 'https://pccontroller.rnstudio.hu',
5657
image: require('./images/step1.png'),
5758
backgroundColor: '#febe29',
5859
},
@@ -63,115 +64,15 @@ const slides = [
6364
image: require('./images/step2.png'),
6465
backgroundColor: '#febe29',
6566
},
66-
{
67-
index: 3,
68-
title: 'Third step',
69-
text: 'Try to make something beauty here.',
70-
image: require('./images/step3.png'),
71-
backgroundColor: '#febe29',
72-
},
73-
{
74-
index: 4,
75-
title: 'Fourth step',
76-
text: 'Here you can open a custom link.',
77-
link: 'https://pccontroller.rnstudio.hu',
78-
image: require('./images/step4.png'),
79-
backgroundColor: '#febe29',
80-
},
8167
];
8268

83-
const BasicExample = () => {
84-
return <SliderIntro data={slides} />;
85-
};
86-
```
87-
88-
<h3>Custom buttons example</h3>
89-
90-
```js
91-
import React from 'react';
92-
import SliderIntro from 'react-native-slider-intro';
93-
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
94-
import {
95-
faArrowCircleRight,
96-
faCheckCircle,
97-
faTimesCircle,
98-
} from '@fortawesome/free-solid-svg-icons';
99-
100-
const slides = [...];
101-
102-
const renderNextButton = () => {
69+
const BasicExample = ({ closeExample }: { closeExample: () => void }) => {
10370
return (
104-
<FontAwesomeIcon icon={faArrowCircleRight} color={'white'} size={35} />
71+
<SliderIntro data={slides} onDone={closeExample} onSkip={closeExample} />
10572
);
10673
};
10774

108-
const renderDoneButton = () => {
109-
return <FontAwesomeIcon icon={faCheckCircle} color={'white'} size={35} />;
110-
};
111-
112-
const renderSkipButton = () => {
113-
return <FontAwesomeIcon icon={faTimesCircle} color={'white'} size={35} />;
114-
};
115-
116-
const CustomButtonsExample = () => {
117-
return (
118-
<SliderIntro
119-
renderNextButton={renderNextButton}
120-
renderDoneButton={renderDoneButton}
121-
renderSkipButton={renderSkipButton}
122-
navContainerMaxSizePercent={0.3}
123-
data={slides}
124-
/>
125-
);
126-
};
127-
```
128-
129-
<h3>Column buttons example</h3>
130-
131-
```js
132-
import React from 'react';
133-
import { View, Text, StyleSheet } from 'react-native';
134-
import SliderIntro from 'react-native-slider-intro';
135-
136-
const slides = [...];
137-
138-
const renderNextButton = () => {
139-
return (
140-
<View style={styles.nextButton}>
141-
<Text style={styles.text}>Next</Text>
142-
</View>
143-
);
144-
};
145-
146-
const renderDoneButton = () => {
147-
return (
148-
<View style={styles.nextButton}>
149-
<Text style={styles.text}>Done</Text>
150-
</View>
151-
);
152-
};
153-
154-
const renderSkipButton = () => {
155-
return (
156-
<View>
157-
<Text style={styles.text}>Skip</Text>
158-
</View>
159-
);
160-
};
161-
162-
const ColumnButtonsExample = () => {
163-
return (
164-
<SliderIntro
165-
renderNextButton={renderNextButton}
166-
renderDoneButton={renderDoneButton}
167-
renderSkipButton={renderSkipButton}
168-
navContainerMaxSizePercent={0.3}
169-
navigationBarHeight={150}
170-
columnButtonStyle={true}
171-
data={slides}
172-
/>
173-
);
174-
};
75+
export default BasicExample;
17576
```
17677

17778
<h2>Properties</h2>

0 commit comments

Comments
 (0)