File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ const options = [
7979| textColor | string | '#000 ' | false | Color text of the not selecteds items |
8080| backgroundColor | string | '#ffffff' | false | Color bg of the component |
8181| borderColor | string | '#c9c9c9' | false | Border Color of the component |
82+ | borderRadius | number | 50 | false | Border Radius of the component |
8283| hasPadding | bool | false | false | Indicate if item has padding |
8384| animationDuration | number | 250 | false | Duration of the animation |
8485| valuePadding | number | 1 | false | Size of padding |
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ const styles = {
2424 alignItems : 'center'
2525 } ,
2626 animated : {
27- borderRadius : 50 ,
2827 borderWidth : 0 ,
2928 position : 'absolute'
3029 }
@@ -134,6 +133,7 @@ export default class SwitchSelector extends Component {
134133 fontSize,
135134 backgroundColor,
136135 borderColor,
136+ borderRadius,
137137 hasPadding,
138138 valuePadding,
139139 height,
@@ -186,7 +186,7 @@ export default class SwitchSelector extends Component {
186186 < View { ...this . _panResponder . panHandlers } style = { { flex : 1 } } >
187187 < View
188188 style = { {
189- borderRadius : 50 ,
189+ borderRadius : borderRadius ,
190190 backgroundColor : backgroundColor ,
191191 height
192192 } }
@@ -201,7 +201,7 @@ export default class SwitchSelector extends Component {
201201 flex : 1 ,
202202 flexDirection : 'row' ,
203203 borderColor : borderColor || '#c9c9c9' ,
204- borderRadius : 60 ,
204+ borderRadius : borderRadius ,
205205 borderWidth : hasPadding ? 1 : 0
206206 } } >
207207 { ! ! this . state . sliderWidth &&
@@ -225,6 +225,7 @@ export default class SwitchSelector extends Component {
225225 } ) ,
226226 } ,
227227 ] ,
228+ borderRadius : borderRadius ,
228229 marginTop : hasPadding ? valuePadding : 0
229230 } ,
230231 styles . animated
@@ -249,6 +250,7 @@ SwitchSelector.defaultProps = {
249250 fontSize : 14 ,
250251 backgroundColor : '#FFFFFF' ,
251252 borderColor : '#C9C9C9' ,
253+ borderRadius : 50 ,
252254 hasPadding : false ,
253255 valuePadding : 1 ,
254256 height : 40 ,
You can’t perform that action at this time.
0 commit comments