diff --git a/ActionButton.js b/ActionButton.js index b8306c2..7aa4dc3 100644 --- a/ActionButton.js +++ b/ActionButton.js @@ -170,13 +170,13 @@ export default class ActionButton extends Component { }), width: this.props.size, height: this.props.size, - borderRadius: this.props.size / 2 + borderRadius: this.props.buttonBorderRadius ? this.props.buttonBorderRadius : this.props.size / 2 }; const buttonStyle = { width: this.props.size, height: this.props.size, - borderRadius: this.props.size / 2, + borderRadius: this.props.buttonBorderRadius ? this.props.buttonBorderRadius : this.props.size / 2, alignItems: "center", justifyContent: "center" }; @@ -187,7 +187,7 @@ export default class ActionButton extends Component { ? { right: this.props.offsetX, zIndex: this.props.zIndex, - borderRadius: this.props.size / 2, + borderRadius: this.props.buttonBorderRadius ? this.props.buttonBorderRadius : this.props.size / 2, width: this.props.size } : { marginHorizontal: this.props.offsetX, zIndex: this.props.zIndex }; diff --git a/README.md b/README.md index 860f1e3..8d978a2 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,7 @@ Take a look at [this gist](https://gist.github.com/mmazzarolo/cfd467436f9d110e94 | degrees | number | 135 | degrees to rotate icon | buttonText | string | + | use this to set a different text on the button | buttonTextStyle | style | null | use this to set the textstyle of the button's text +| buttonBorderRadius | number | size / 2 | use this to set the borderRadius of the button | onReset | function | null | use this to set the callback that will be called after the button reset's it's items | verticalOrientation | string | "up" | direction action buttons should expand. One of: `up` or `down` | backgroundTappable | boolean | false | make background tappable in active state of ActionButton diff --git a/index.d.ts b/index.d.ts index c10dc75..656fee6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -21,6 +21,7 @@ export interface ActionButtonProperties extends ViewProperties { buttonColor?: string, buttonTextStyle?: TextStyle, buttonText?: string, + buttonBorderRadius?: number, offsetX?: number, offsetY?: number,