@@ -14,11 +14,13 @@ You can have a real life look how this can be used within storybook [(source)](.
14
14
[ ![ npm downloads] ( https://img.shields.io/npm/dm/@farbenmeer/react-spring-slider.svg?style=flat-square )] ( https://www.npmjs.com/package/@farbenmeer/react-spring-slider?style=flat-square )
15
15
</div >
16
16
17
- 1 . [ Installation] ( #installation )
18
- 2 . [ Usage] ( #usage )
19
- 3 . [ Configuration] ( #configuration )
20
- 4 . [ More Examples] ( #more-examples )
21
- 5 . [ Contribution] ( #contribution )
17
+ - [ Installation] ( #installation )
18
+ - [ Usage] ( #usage )
19
+ - [ Configuration] ( #configuration )
20
+ - [ More examples] ( #more-examples )
21
+ - [Custom bulletStyle](#custom-bulletstyle)
22
+ - [Fully customized](#fully-customized)
23
+ - [ Contribution] ( #contribution )
22
24
23
25
24
26
## Installation
@@ -94,43 +96,6 @@ const App = () => {
94
96
const onSlideChange = (index ) => console .log (` changed to slide ${ index} ` );
95
97
const setSlideCustom = () => 1 ;
96
98
97
- const BulletComponent = ({ onClick, isActive }) => (
98
- < li
99
- style= {{
100
- width: " 25px" ,
101
- height: " 25px" ,
102
- backgroundColor: " red" ,
103
- margin: " 0 2px" ,
104
- opacity: isActive && " 0.5" ,
105
- }}
106
- onClick= {onClick}
107
- / >
108
- );
109
-
110
- BulletComponent .propTypes = {
111
- onClick: PropTypes .func .isRequired ,
112
- isActive: PropTypes .bool .isRequired ,
113
- };
114
-
115
- const ArrowComponent = ({ onClick, direction }) => {
116
- return (
117
- < div
118
- style= {{
119
- border: " 1px solid black" ,
120
- padding: " 1em" ,
121
- backgroundColor: " white" ,
122
- }}
123
- onClick= {onClick}
124
- >
125
- {direction}
126
- < / div>
127
- );
128
- };
129
-
130
- ArrowComponent .propTypes = {
131
- onClick: PropTypes .func .isRequired ,
132
- direction: PropTypes .string .isRequired ,
133
- };
134
99
135
100
return (
136
101
< Slider
@@ -149,6 +114,44 @@ const App = () => {
149
114
< / Slider>
150
115
);
151
116
};
117
+
118
+ const BulletComponent = ({ onClick, isActive }) => (
119
+ < li
120
+ style= {{
121
+ width: " 25px" ,
122
+ height: " 25px" ,
123
+ backgroundColor: " red" ,
124
+ margin: " 0 2px" ,
125
+ opacity: isActive && " 0.5" ,
126
+ }}
127
+ onClick= {onClick}
128
+ / >
129
+ );
130
+
131
+ BulletComponent .propTypes = {
132
+ onClick: PropTypes .func .isRequired ,
133
+ isActive: PropTypes .bool .isRequired ,
134
+ };
135
+
136
+ const ArrowComponent = ({ onClick, direction }) => {
137
+ return (
138
+ < div
139
+ style= {{
140
+ border: " 1px solid black" ,
141
+ padding: " 1em" ,
142
+ backgroundColor: " white" ,
143
+ }}
144
+ onClick= {onClick}
145
+ >
146
+ {direction}
147
+ < / div>
148
+ );
149
+ };
150
+
151
+ ArrowComponent .propTypes = {
152
+ onClick: PropTypes .func .isRequired ,
153
+ direction: PropTypes .string .isRequired ,
154
+ };
152
155
```
153
156
154
157
For more examples have a look at [ storybook] ( https://farbenmeer.github.io/react-spring-slider/ ) [ (storybook source code)] ( ./src/index.stories.tsx ) .
0 commit comments