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

Commit

Permalink
Drawer menu items with label support
Browse files Browse the repository at this point in the history
  • Loading branch information
bozzmob committed Dec 27, 2015
1 parent 7c8fef9 commit 917803f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Drawer/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default class Item extends Component {
static propTypes = {
icon: PropTypes.string,
value: PropTypes.string.isRequired,
label: PropTypes.string,
onPress: PropTypes.func,
active: PropTypes.bool,
disabled: PropTypes.bool
Expand All @@ -18,7 +19,7 @@ export default class Item extends Component {
};

render() {
const { icon, value, onPress } = this.props;
const { icon, value, label, onPress } = this.props;

return (
<TouchableHighlight
Expand All @@ -39,6 +40,11 @@ export default class Item extends Component {
</Text>

</View>
<View style={styles.label}>
<Text style={[TYPO.paperFontBody2, { color: 'rgba(0,0,0,.87)' }]}>
{label}
</Text>
</View>
</View>
</TouchableHighlight>

Expand All @@ -64,5 +70,8 @@ const styles = {
flex: 1,
paddingLeft: 34,
top: 2
},
label: {
top: 2
}
};

0 comments on commit 917803f

Please sign in to comment.