@@ -36,28 +36,28 @@ import SegmentedControl from "react-native-segmented-control-2";
3636## Fundamental Usage
3737
3838``` jsx
39- < SegmentedControl
40- tabs= {[" Label 1" , " Label 2" , " Label 3" ]}
41- onChange= {(index : number ) => console .log (" Index: " , index)}
39+ < SegmentedControl
40+ tabs= {[" Label 1" , " Label 2" , " Label 3" ]}
41+ onChange= {(index : number ) => console .log (" Index: " , index)}
4242/ >
4343```
4444
4545## Customized Usage
4646
4747``` jsx
4848< SegmentedControl
49- style= {{ marginTop: 32 , backgroundColor: " #ffe0e0" }}
50- activeTabColor= " #ff2929"
51- activeTextColor= " #fff"
52- tabs= {[" Label 1" , " Label 2" , " Label 3" ]}
53- onChange= {(index : number ) => console .log (" Index: " , index)}
49+ style= {{ marginTop: 32 , backgroundColor: " #ffe0e0" }}
50+ activeTabColor= " #ff2929"
51+ activeTextColor= " #fff"
52+ tabs= {[" Label 1" , " Label 2" , " Label 3" ]}
53+ onChange= {(index : number ) => console .log (" Index: " , index)}
5454/ >
5555```
5656
5757### Any Component Usage
5858
59- You can use the segmented control with any component.
60- All you need to do is that put any component into the ` tabs ` props.
59+ You can use the segmented control with any component.
60+ All you need to do is that put any component into the ` tabs ` props.
6161Please check out the ` example ` for its usage
6262
6363## Example Project 😍
@@ -75,23 +75,23 @@ should work of the example project.
7575
7676## Fundamentals
7777
78-
79- | Property | Type | Default | Description |
80- | ----------| :--------:| :-------: | ------------------------------------------------|
81- | tabs | any[ ] | undefined | set the array for tabs |
82- | onChange | function | undefined | set your own logic when the tab is pressed / changed |
78+ | Property | Type | Default | Description |
79+ | -------- | :------: | :-------: | ---------------------------------------------------- |
80+ | tabs | any[ ] | undefined | set the array for tabs |
81+ | onChange | function | undefined | set your own logic when the tab is pressed / changed |
8382
8483## Customization (Optionals)
8584
86- | Property | Type | Default | Description |
87- | -----------------| :---------:| :-----------------:| ---------------------------------------------------------|
88- | style | ViewStyle | default | set or override the style object for the main container |
89- | width | number | ScreenWidth * 0.9 | change the width of the main segmented control |
90- | initialIndex | number | 0 | set the initial index |
91- | activeTextColor | string | #000 | change the active tab's text color |
92- | activeTabColor | string | #FFF | change the active tab's color |
93- | tabStyle | ViewStyle | default | set or override the style object for the tab |
94- | textStyle | TextStyle | default | set or override the style object for tab's text |
85+ | Property | Type | Default | Description |
86+ | ---------------- | :-------: | :----------------: | ------------------------------------------------------- |
87+ | style | ViewStyle | default | set or override the style object for the main container |
88+ | width | number | ScreenWidth \* 0.9 | change the width of the main segmented control |
89+ | initialIndex | number | 0 | set the initial index |
90+ | activeTextColor | string | #000 | change the active tab's text color |
91+ | activeTabColor | string | #FFF | change the active tab's color |
92+ | tabStyle | ViewStyle | default | set or override the style object for the tab |
93+ | selectedTabStyle | ViewStyle | default | set or override the style object for the selected tab |
94+ | textStyle | TextStyle | default | set or override the style object for tab's text |
9595
9696## Future Plans
9797
@@ -100,7 +100,8 @@ should work of the example project.
100100
101101## Credits
102102
103- Heavily inspired by these libraries:
103+ Heavily inspired by these libraries:
104+
104105- [ react-native-segmented-control/segmented-control] ( https://github.com/react-native-segmented-control/segmented-control )
105106- [ Karthik-B-06/react-native-segmented-control] ( https://github.com/Karthik-B-06/react-native-segmented-control )
106107
0 commit comments