Skip to content

Commit ad81124

Browse files
committed
styles prop and shadowStyleprops are added. Also main container is changed a bit
1 parent 415dcbd commit ad81124

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

lib/src/components/bottomMenu/BottomMenu.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@ import React, { Component } from "react";
22
import PropTypes from "prop-types";
33
import { View } from "react-native";
44
import Androw from "react-native-androw";
5-
import styles, { mainStyle, _shadowStyle } from "./BottomMenu.style";
5+
import { _container, mainStyle, _shadowStyle } from "./BottomMenu.style";
66

77
class BottomMenu extends Component {
88
render() {
99
const {
10-
height,
1110
width,
11+
height,
1212
backgroundColor,
1313
shadowColor,
14+
shadowStyle,
15+
styles,
1416
children
1517
} = this.props;
1618
return (
17-
<Androw style={[styles.container, _shadowStyle(shadowColor)]}>
19+
<Androw
20+
style={[
21+
styles || _container(height),
22+
shadowStyle || _shadowStyle(shadowColor)
23+
]}
24+
>
1825
<View style={mainStyle(height, width, backgroundColor)}>
1926
{children}
2027
</View>

lib/src/components/bottomMenu/BottomMenu.style.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export function mainStyle(height, width, backgroundColor) {
3030
};
3131
}
3232

33-
export default {
34-
container: {
33+
export function _container(maxHeight) {
34+
return {
3535
flex: 1,
36-
marginBottom: 36,
36+
maxHeight: maxHeight,
3737
alignSelf: "center",
3838
justifyContent: "flex-end"
39-
}
40-
};
39+
};
40+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-bottom-menu",
3-
"version": "0.0.1",
3+
"version": "0.0.11",
44
"description": "Fully customizable and dynamic Bottom Menu for React Native.",
55
"keywords": [
66
"bottom",

0 commit comments

Comments
 (0)