Skip to content

Commit

Permalink
Fix cell align when isSelected is used. (#21227)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioEstevao committed Mar 30, 2020
1 parent 1722dbf commit 4ed16bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/components/src/mobile/bottom-sheet/cell.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class BottomSheetCell extends Component {
? cellLabelLeftAlignNoIconStyle
: cellLabelCenteredStyle;
const defaultLabelStyle =
showValue || customActionButton
showValue || customActionButton || icon
? cellLabelStyle
: defaultMissingIconAndValue;

Expand Down Expand Up @@ -319,12 +319,6 @@ class BottomSheetCell extends Component {
<Text style={ [ defaultLabelStyle, labelStyle ] }>
{ label }
</Text>
{ isSelected && (
<Icon
icon={ check }
fill={ platformStyles.isSelected.color }
/>
) }
</View>
{ customActionButton && (
<TouchableOpacity
Expand All @@ -337,6 +331,12 @@ class BottomSheetCell extends Component {
</TouchableOpacity>
) }
</View>
{ isSelected && (
<Icon
icon={ check }
fill={ platformStyles.isSelected.color }
/>
) }
{ showValue && getValueComponent() }
{ children }
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
flex-direction: row;
min-height: 48;
align-items: center;
justify-content: space-between;
}

.clipToBounds {
Expand Down

0 comments on commit 4ed16bb

Please sign in to comment.