Skip to content

Commit

Permalink
fix(ButtonGroup): Set style background color to ButtonGroup (#1040)
Browse files Browse the repository at this point in the history
* fix(ButtonGroup): Set style background color to ButtonGroup

Closes  #1011

* fix(ButtonGroup): Set style background color to ButtonGroup

Closes #1011

* fix(ButtonGroup): Set style background color to ButtonGroup

Closes #1011

* fix(ButtonGroup): Set style background color to ButtonGroup

Closes #1011
  • Loading branch information
dincozdemir authored and xavier-villelegier committed Mar 30, 2018
1 parent fdfaa09 commit 063b93f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/buttons/ButtonGroup.js
Expand Up @@ -94,15 +94,15 @@ const ButtonGroup = props => {
borderTopLeftRadius: containerBorderRadius,
borderBottomLeftRadius: containerBorderRadius,
},
isSelected && {
backgroundColor: colors.primary,
},
]}
>
<View
style={[
styles.textContainer,
buttonStyle && buttonStyle,
isSelected && {
backgroundColor: colors.primary,
},
isSelected && selectedButtonStyle && selectedButtonStyle,
]}
>
Expand Down
32 changes: 16 additions & 16 deletions src/buttons/__tests__/__snapshots__/ButtonGroup.js.snap
Expand Up @@ -43,7 +43,6 @@ exports[`ButtonGroup Component should have onPress event 1`] = `
"borderBottomLeftRadius": 3,
"borderTopLeftRadius": 3,
},
false,
]
}
underlayColor="#2089dc"
Expand All @@ -60,6 +59,7 @@ exports[`ButtonGroup Component should have onPress event 1`] = `
"backgroundColor": "blue",
},
false,
false,
]
}
>
Expand Down Expand Up @@ -101,7 +101,6 @@ exports[`ButtonGroup Component should have onPress event 1`] = `
},
false,
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -118,6 +117,7 @@ exports[`ButtonGroup Component should have onPress event 1`] = `
"backgroundColor": "blue",
},
false,
false,
]
}
>
Expand Down Expand Up @@ -156,7 +156,6 @@ exports[`ButtonGroup Component should have onPress event 1`] = `
"borderTopRightRadius": 3,
},
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -173,6 +172,7 @@ exports[`ButtonGroup Component should have onPress event 1`] = `
"backgroundColor": "blue",
},
false,
false,
]
}
>
Expand Down Expand Up @@ -238,7 +238,6 @@ exports[`ButtonGroup Component should render lastButtonStyle 1`] = `
"borderBottomLeftRadius": 3,
"borderTopLeftRadius": 3,
},
false,
]
}
underlayColor="#2089dc"
Expand All @@ -253,6 +252,7 @@ exports[`ButtonGroup Component should render lastButtonStyle 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -294,7 +294,6 @@ exports[`ButtonGroup Component should render lastButtonStyle 1`] = `
},
false,
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -309,6 +308,7 @@ exports[`ButtonGroup Component should render lastButtonStyle 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -348,7 +348,6 @@ exports[`ButtonGroup Component should render lastButtonStyle 1`] = `
"borderTopRightRadius": 3,
},
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -363,6 +362,7 @@ exports[`ButtonGroup Component should render lastButtonStyle 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -428,7 +428,6 @@ exports[`ButtonGroup Component should render selectedIndex 1`] = `
"borderBottomLeftRadius": 3,
"borderTopLeftRadius": 3,
},
false,
]
}
underlayColor="#2089dc"
Expand All @@ -443,6 +442,7 @@ exports[`ButtonGroup Component should render selectedIndex 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -484,9 +484,6 @@ exports[`ButtonGroup Component should render selectedIndex 1`] = `
},
false,
false,
Object {
"backgroundColor": "#2089dc",
},
]
}
underlayColor="#2089dc"
Expand All @@ -500,6 +497,9 @@ exports[`ButtonGroup Component should render selectedIndex 1`] = `
"justifyContent": "center",
},
undefined,
Object {
"backgroundColor": "#2089dc",
},
Object {
"backgroundColor": "red",
},
Expand Down Expand Up @@ -545,7 +545,6 @@ exports[`ButtonGroup Component should render selectedIndex 1`] = `
"borderTopRightRadius": 3,
},
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -560,6 +559,7 @@ exports[`ButtonGroup Component should render selectedIndex 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -625,7 +625,6 @@ exports[`ButtonGroup Component should render with button.element 1`] = `
"borderBottomLeftRadius": 3,
"borderTopLeftRadius": 3,
},
false,
]
}
underlayColor="#2089dc"
Expand All @@ -640,6 +639,7 @@ exports[`ButtonGroup Component should render with button.element 1`] = `
},
undefined,
false,
false,
]
}
>
Expand All @@ -666,7 +666,6 @@ exports[`ButtonGroup Component should render with button.element 1`] = `
"borderTopRightRadius": 3,
},
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -681,6 +680,7 @@ exports[`ButtonGroup Component should render with button.element 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -731,7 +731,6 @@ exports[`ButtonGroup Component should render without issues 1`] = `
"borderBottomLeftRadius": 3,
"borderTopLeftRadius": 3,
},
false,
]
}
underlayColor="#2089dc"
Expand All @@ -746,6 +745,7 @@ exports[`ButtonGroup Component should render without issues 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -787,7 +787,6 @@ exports[`ButtonGroup Component should render without issues 1`] = `
},
false,
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -802,6 +801,7 @@ exports[`ButtonGroup Component should render without issues 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down Expand Up @@ -840,7 +840,6 @@ exports[`ButtonGroup Component should render without issues 1`] = `
"borderTopRightRadius": 3,
},
false,
false,
]
}
underlayColor="#2089dc"
Expand All @@ -855,6 +854,7 @@ exports[`ButtonGroup Component should render without issues 1`] = `
},
undefined,
false,
false,
]
}
>
Expand Down

0 comments on commit 063b93f

Please sign in to comment.