Skip to content
Open
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
18 changes: 17 additions & 1 deletion ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import {
import PropTypes from 'prop-types';
import ActionButtonItem from './ActionButtonItem';

const defaultConfig = {
actionOverlay:{
bottom:70
}
}

const alignMap = {
center: {
alignItems: 'center',
Expand Down Expand Up @@ -54,6 +60,10 @@ export default class ActionButton extends Component {
getActionButtonStyle() {
return [styles.actionBarItem, this.getButtonSize()];
}
getActionContainerOverlay() {
const {bottomDistance} = this.props
return [styles.buttonActionOverlay, {bottom:(bottomDistance)?bottomDistance:defaultConfig.actionOverlay.bottom}];
}

getActionContainerStyle() {
const {alignItems, justifyContent} = alignMap[this.props.position];
Expand Down Expand Up @@ -241,7 +251,9 @@ export default class ActionButton extends Component {
>
{backdrop}

{this.props.children && this.renderActions()}
<View style={this.getActionContainerOverlay()}>
{this.props.children && this.renderActions()}
</View>
<View
pointerEvents="box-none"
style={this.getActionContainerStyle()}
Expand Down Expand Up @@ -296,6 +308,10 @@ ActionButton.defaultProps = {
};

const styles = StyleSheet.create({
buttonActionOverlay:{
position:"absolute",
bottom:100
},
overlay: {
position: 'absolute',
bottom: 0,
Expand Down