react-native-material-design icon indicating copy to clipboard operation
react-native-material-design copied to clipboard

Propagate custom styles in drawer section

Open koustuvsinha opened this issue 9 years ago • 4 comments

I cant apply my own custom styles in Drawer.Section. Probably the styles as prop should be passed on here?

The need of this is because several times the section headers are overalapped and even the items are not visible at times. Here is a screenshot of what happens when i place two sections one after the other :

screen

Also, if there is two sections one after the other, and the second one contains say 3 or more elements, some of them are not even rendered in view :

<Drawer.Section
              items={[{
                  icon: 'home',
                  value: 'Profile Page'
              }
            ]}
          />
        <Drawer.Section
            title="Actions"
            items={[
              {
                icon: 'settings',
                value: 'Settings'
              },
              {
                icon: 'label',
                value: 'Settings-2',
                label: '12'
              },
              {
                icon: 'exit-to-app',
                value: 'Exit'
              }
            ]}
            style={styles.section}
            />

      </Drawer>

screen2

Thus i feel maybe propagating the user css might resolve this issue. What do you think?

koustuvsinha avatar Jul 08 '16 08:07 koustuvsinha

also have this problem

ufon avatar Jul 24 '16 15:07 ufon

also have this problem

lakeoffaith avatar Jul 25 '16 01:07 lakeoffaith

Want to submit a pull request?

mlabrum avatar Jul 26 '16 04:07 mlabrum

remove the flex attribute in the session's style can resolve the issue.

const styles = {
    section: {
        //flex: 1,
        marginTop: 8
    }
    ...

KasperDeng avatar Aug 03 '16 16:08 KasperDeng