Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Added elevation & prop to Toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehesp committed Dec 23, 2015
1 parent 8ebb439 commit 4a2b598
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default class Toolbar extends Component {
theme: PropTypes.oneOf(THEME_NAME),
primary: PropTypes.oneOf(PRIMARY_COLORS),
style: PropTypes.object,
elevation: PropTypes.number,
overrides: PropTypes.shape({
backgroundColor: PropTypes.string,
titleColor: PropTypes.string,
Expand All @@ -29,11 +30,12 @@ export default class Toolbar extends Component {

static defaultProps = {
theme: 'dark',
primary: PRIMARY
primary: PRIMARY,
elevation: 4
};

render() {
const { title, theme, primary, style, overrides, icon, onIconPress, actions } = this.props;
const { title, theme, primary, style, elevation, overrides, icon, onIconPress, actions } = this.props;

const themeMap = {
light: {
Expand All @@ -55,7 +57,7 @@ export default class Toolbar extends Component {
};

return (
<View style={[styles.toolbar, { backgroundColor :styleMap.backgroundColor }, style]}>
<View style={[styles.toolbar, { backgroundColor :styleMap.backgroundColor, elevation }, style]}>
{
icon && (
<IconButton onPress={onIconPress}>
Expand Down

0 comments on commit 4a2b598

Please sign in to comment.