invertase / react-native-material-design

React Native UI Components for Material Design
http://react-native-material-design.github.io
MIT License
3.15k stars 366 forks source link

App Drawer Icons have no Padding #168

Open DaveBben opened 6 years ago

DaveBben commented 6 years ago

drawer For some reason, the icons in my app drawer are against the edge of the screen without any padding. My code is almost exactly like the demo. Applying any sort of styling to the Drawer.section has no effect.

<Drawer theme="light">
        <Drawer.Header image={<Image source={require('../img/nav.jpg')} />}>
          <View style={styles.header}>
            <Text style={[styles.text, COLOR.paperGrey50, TYPO.paperFontSubhead]}>Stories for Reddit</Text>
          </View>
        </Drawer.Header>
        <Drawer.Section
          items={[{
            icon: 'home',
            value: 'Home',
            onPress: () => onPress('Home'),
          },
          {
            icon: 'face',
            value: 'Subreddits',
            onPress: () => onPress('Subreddits'),
          },
          ]}
          style={styles.section}
        />
      </Drawer>
    );
  }
}

const styles = StyleSheet.create({
  header: {
    paddingTop: 16,
  },
  text: {
    marginTop: 90,
  },
  section: {
    flex: 1,
    marginRight: 80,
    paddingLeft: 40,
    color: '#fff',
  },
});