Skip to content

Commit 036d5a0

Browse files
committed
Add doc
1 parent 347df0f commit 036d5a0

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,56 @@ yarn add @reason-react-native/slider
4242
}
4343
```
4444

45+
## Usage
46+
47+
```re
48+
ReactNativeSlider.make(
49+
~style: ReactNative.Style.t=?,
50+
~value: int=?,
51+
~step: int=?,
52+
~minimumValue: int=?,
53+
~maximumValue: int=?,
54+
~minimumTrackTintColor: string=?,
55+
~maximumTrackTintColor: string=?,
56+
~disabled: bool=?,
57+
~onSlidingStart: int => unit=?,
58+
~onSlidingComplete: int => unit=?,
59+
~onValueChange: int => unit=?,
60+
~testID: string=?,
61+
~children: React.element=?,
62+
// iOS Props
63+
~maximumTrackImage: ReactNative.Image.Source.t=?,
64+
~minimumTrackImage: ReactNative.Image.Source.t=?,
65+
~thumbImage: ReactNative.Image.Source.t=?,
66+
~trackImage: ReactNative.Image.Source.t=?,
67+
~inverted: bool=?,
68+
// Android
69+
~thumbTintColor: string=?
70+
71+
// ... And all <View> props
72+
)
73+
```
74+
75+
### Example
76+
77+
```re
78+
<ReactNativeSlider
79+
style={
80+
ReactNative.Style.(
81+
style(
82+
~width=200.->dp,
83+
~height=40.->dp,
84+
()
85+
)
86+
)
87+
}
88+
minimumValue={0}
89+
maximumValue={1}
90+
minimumTrackTintColor="#FFFFFF"
91+
maximumTrackTintColor="#000000"
92+
/>
93+
```
94+
4595
---
4696
4797
## Changelog

0 commit comments

Comments
 (0)