Skip to content

Commit ed05bbf

Browse files
authored
Update ActionButtonItem.js
Add border radius prop in Action button item
1 parent 7d24be4 commit ed05bbf

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

ActionButtonItem.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default class ActionButtonItem extends Component {
3535
activeOpacity: DEFAULT_ACTIVE_OPACITY,
3636
fixNativeFeedbackRadius: false,
3737
nativeFeedbackRippleColor: "rgba(255,255,255,0.75)",
38-
numberOfLines: 1,
3938
};
4039
}
4140

@@ -45,8 +44,7 @@ export default class ActionButtonItem extends Component {
4544
useNativeFeedback: PropTypes.bool,
4645
fixNativeFeedbackRadius: PropTypes.bool,
4746
nativeFeedbackRippleColor: PropTypes.string,
48-
activeOpacity: PropTypes.number,
49-
numberOfLines: PropTypes.number,
47+
activeOpacity: PropTypes.number
5048
};
5149
}
5250

@@ -56,7 +54,8 @@ export default class ActionButtonItem extends Component {
5654
position,
5755
verticalOrientation,
5856
hideShadow,
59-
spacing
57+
spacing,
58+
borderRadius
6059
} = this.props;
6160

6261
if (!this.props.active) return null;
@@ -82,7 +81,7 @@ export default class ActionButtonItem extends Component {
8281
alignItems: "center",
8382
width: size,
8483
height: size,
85-
borderRadius: size / 2,
84+
borderRadius: borderRadius|| size / 2,
8685
backgroundColor: this.props.buttonColor || this.props.btnColor
8786
};
8887

@@ -97,7 +96,7 @@ export default class ActionButtonItem extends Component {
9796
height: size,
9897
marginBottom: spacing,
9998
right: this.props.offsetX,
100-
borderRadius: this.props.size / 2
99+
borderRadius:borderRadius|| this.props.size / 2
101100
}
102101
: {
103102
paddingHorizontal: this.props.offsetX,
@@ -110,7 +109,6 @@ export default class ActionButtonItem extends Component {
110109
>
111110
<View>
112111
<Touchable
113-
rejectResponderTermination
114112
testID={this.props.testID}
115113
accessibilityLabel={this.props.accessibilityLabel}
116114
background={touchableBackground(
@@ -143,8 +141,7 @@ export default class ActionButtonItem extends Component {
143141
parentSize,
144142
size,
145143
position,
146-
spaceBetween,
147-
numberOfLines,
144+
spaceBetween
148145
} = this.props;
149146
const offsetTop = Math.max(size / 2 - TEXT_HEIGHT / 2, 0);
150147
const positionStyles = { top: offsetTop };
@@ -173,7 +170,6 @@ export default class ActionButtonItem extends Component {
173170
<Text
174171
allowFontScaling={false}
175172
style={[styles.text, this.props.textStyle]}
176-
numberOfLines={numberOfLines}
177173
>
178174
{this.props.title}
179175
</Text>
@@ -182,7 +178,6 @@ export default class ActionButtonItem extends Component {
182178

183179
return (
184180
<TextTouchable
185-
rejectResponderTermination
186181
background={touchableBackground(
187182
this.props.nativeFeedbackRippleColor,
188183
this.props.fixNativeFeedbackRadius

0 commit comments

Comments
 (0)