react-native-action-button icon indicating copy to clipboard operation
react-native-action-button copied to clipboard

non-default size for ActionButton.Item(s) renders truncated circle

Open moritzschaefer opened this issue 8 years ago • 4 comments

Changing the size of the ActionButton.Item(s) renders them truncated and with a weird circle aligned strangely. This behaviour came with a new version of either react-native-action-button or react-native (i.e. in earlier versions (one month ago), there hasn't been this problem)

moritzschaefer avatar Jul 24 '17 23:07 moritzschaefer

V2.6.10 is still ok, since v2.7.0 I'm also seeing this issue

GertjanReynaert avatar Jul 25 '17 13:07 GertjanReynaert

Thanks for specifying the version

moritzschaefer avatar Jul 25 '17 13:07 moritzschaefer

2.6.10 does the trick for me as well!

dscx avatar Jul 25 '17 15:07 dscx

You can fix by yourself, on ActionButtonItem.js:

  1. Comment line 88 & 89:
if (position !== "center")
    buttonStyle[position] = (this.props.parentSize - size) / 2;
  1. Add this after line 103:
marginRight:
              position !== "center" ? (this.props.parentSize - size) / 2 : 0

phuonglx avatar Aug 13 '17 13:08 phuonglx