DrawerSection
A DrawerSection groups content inside a navigation drawer.
Usage
import * as React from 'react';
import { DrawerSection, DrawerItem } from 'react-native-paper';
export default class MyComponent extends React.Component {
state = {
active: 'First Item',
};
render() {
const { active } = this.state;
return (
<DrawerSection title="Some title">
<DrawerItem
label="First Item"
active={active === 'First Item'}
onPress={() => { this.setState({ active: 'First Item' }); }}
/>
<DrawerItem
label="Second Item"
active={active === 'Second Item'}
onPress={() => { this.setState({ active: 'Second Item' }); }}
/>
</DrawerSection>
);
}
}