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

Commit

Permalink
Drawer items now broken into sections & updates with themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehesp committed Dec 28, 2015
1 parent f4b329c commit b8ccf01
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 116 deletions.
3 changes: 2 additions & 1 deletion lib/Drawer/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default class Header extends Component {

const styles = {
header: {
paddingHorizontal: 16
paddingHorizontal: 16,
marginBottom: 8
}
};
77 changes: 0 additions & 77 deletions lib/Drawer/Item.js

This file was deleted.

32 changes: 0 additions & 32 deletions lib/Drawer/Subheader.js

This file was deleted.

13 changes: 7 additions & 6 deletions lib/Drawer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { THEME_NAME, PRIMARY_COLORS } from '../config';
import { getColor } from '../helpers';

import Header from './Header';
import Item from './Item';
import Subheader from './Subheader';
import Section from './Section';

export default class Drawer extends Component {

Expand All @@ -24,9 +23,7 @@ export default class Drawer extends Component {

static Header = Header;

static Item = Item;

static Subheader = Subheader;
static Section = Section;

render() {
const { theme, overrides, children } = this.props;
Expand All @@ -45,7 +42,11 @@ export default class Drawer extends Component {

return (
<ScrollView style={Object.assign(styles.container, { backgroundColor })}>
{children}
{React.Children.map(children, (child) => {
return React.cloneElement(child, {
theme
});
})}
</ScrollView>
);
}
Expand Down

0 comments on commit b8ccf01

Please sign in to comment.