Skip to content

newDrawer - support only rightItems in drawer #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/interactableComponents/drawer/newDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ class NewDrawer extends PureBaseComponent {
// TODO: enable support for rendering more than one left item
renderLeftActions = (progress, dragX) => {
const {leftItem} = this.getThemeProps();
return this.renderActions([leftItem], progress, dragX);
const leftItems = leftItem ? [leftItem] : undefined;
return this.renderActions(leftItems, progress, dragX);
};

renderRightActions = (progress, dragX) => {
Expand Down Expand Up @@ -190,10 +191,10 @@ class NewDrawer extends PureBaseComponent {
style={[
styles.actionIcon,
{
width: itemsIconSize,
height: itemsIconSize,
tintColor: itemsTintColor,
opacity,
width: itemsIconSize,
height: itemsIconSize,
tintColor: itemsTintColor,
opacity,
transform: [{scale}]
}
]}
Expand All @@ -202,12 +203,12 @@ class NewDrawer extends PureBaseComponent {
{item.text && (
<Animated.Text
style={[
styles.actionText,
styles.actionText,
{
color: itemsTintColor,
opacity,
color: itemsTintColor,
opacity,
transform: [{scale}]
},
},
itemsTextStyle
]}
>
Expand Down