@@ -68,35 +68,37 @@ const options = [
6868### Props
6969
7070| Prop | Type | Default | Required | Note |
71- | ------------------------- | ----------------------- | ----------- | -------- | -------------------------------------------------------------------------------- |
72- | options | array | null | true | Items array to render. Each item has a label and a value and optionals icons |
73- | options[ ] .label | string | null | true | Label from each item |
74- | options[ ] .value | string | null | true | Value from each item |
75- | options[ ] .customIcon | Jsx element ou Function | null | false | Optional custom icon from each item |
76- | options[ ] .imageIcon | string | null | false | Source from a image icon form each item. Has the same color then label in render |
77- | options[ ] .activeColor | string | null | false | Color from each item when is selected |
78- | initial | number | 0 | true | Item selected in initial render |
79- | value | number | undefined | false | The switch value (will call onPress) |
80- | onPress | function | console.log | true | Callback function called after change value. |
81- | disableValueChangeOnPress | bool | false | false | Disables the onPress call when the value is manually changed |
82- | fontSize | number | null | false | Font size from labels. If null default fontSize of the app is used. |
83- | selectedColor | string | '#fff' | false | Color text of the item selected |
84- | buttonColor | string | '#BCD635' | false | Color bg of the item selected |
85- | textColor | string | '#000 ' | false | Color text of the not selecteds items |
86- | backgroundColor | string | '#ffffff' | false | Color bg of the component |
87- | borderColor | string | '#c9c9c9' | false | Border Color of the component |
88- | borderRadius | number | 50 | false | Border Radius of the component |
89- | hasPadding | bool | false | false | Indicate if item has padding |
90- | animationDuration | number | 250 | false | Duration of the animation |
91- | valuePadding | number | 1 | false | Size of padding |
92- | height | number | 40 | false | Height of component |
93- | bold | bool | false | false | Indicate if text has fontWeight bold |
94- | textStyle | object | {} | false | Text style |
95- | selectedTextStyle | object | {} | false | Selected text style |
96- | imageStyle | object | {} | false | Image style |
97- | style | object | {} | false | Container style |
98- | returnObject | bool | false | false | Indicate if onPress function return an option instead of option.value |
99- | disabled | bool | false | false | Disables the switch |
71+ | ------------------------- | ----------------------- | ----------- | -------- | -------------------------------------------------------------------------------- |
72+ | options | array | null | true | Items array to render. Each item has a label and a value and optionals icons |
73+ | options[ ] .label | string | null | true | Label from each item |
74+ | options[ ] .value | string | null | true | Value from each item |
75+ | options[ ] .customIcon | Jsx element ou Function | null | false | Optional custom icon from each item |
76+ | options[ ] .imageIcon | string | null | false | Source from a image icon form each item. Has the same color then label in render |
77+ | options[ ] .activeColor | string | null | false | Color from each item when is selected |
78+ | initial | number | 0 | true | Item selected in initial render |
79+ | value | number | undefined | false | The switch value (will call onPress) |
80+ | onPress | function | console.log | true | Callback function called after change value. |
81+ | disableValueChangeOnPress | bool | false | false | Disables the onPress call when the value is manually changed |
82+ | fontSize | number | null | false | Font size from labels. If null default fontSize of the app is used. |
83+ | selectedColor | string | '#fff' | false | Color text of the item selected |
84+ | buttonColor | string | '#BCD635' | false | Color bg of the item selected |
85+ | textColor | string | '#000 ' | false | Color text of the not selecteds items |
86+ | backgroundColor | string | '#ffffff' | false | Color bg of the component |
87+ | borderColor | string | '#c9c9c9' | false | Border Color of the component |
88+ | borderRadius | number | 50 | false | Border Radius of the component |
89+ | hasPadding | bool | false | false | Indicate if item has padding |
90+ | animationDuration | number | 250 | false | Duration of the animation |
91+ | valuePadding | number | 1 | false | Size of padding |
92+ | height | number | 40 | false | Height of component |
93+ | bold | bool | false | false | Indicate if text has fontWeight bold |
94+ | textStyle | object | {} | false | Text style |
95+ | selectedTextStyle | object | {} | false | Selected text style |
96+ | textContainerStyle | object | {} | false | Style for text (and icon) container (TouchableOpacity) |
97+ | selectedTextContainerStyle | object | {} | false | Style for selected text (and icon) container (TouchableOpacity) |
98+ | imageStyle | object | {} | false | Image style |
99+ | style | object | {} | false | Container style |
100+ | returnObject | bool | false | false | Indicate if onPress function return an option instead of option.value |
101+ | disabled | bool | false | false | Disables the switch |
100102
101103### Authors
102104
0 commit comments