Skip to content
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

added buttonBorderRadius prop to ActionButton #298

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
Expand All @@ -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 };
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface ActionButtonProperties extends ViewProperties {
buttonColor?: string,
buttonTextStyle?: TextStyle,
buttonText?: string,
buttonBorderRadius?: number,

offsetX?: number,
offsetY?: number,
Expand Down