Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change Drawer.Item - Divider theme #4394

Closed
grumpyTofu opened this issue May 2, 2024 · 1 comment
Closed

Unable to change Drawer.Item - Divider theme #4394

grumpyTofu opened this issue May 2, 2024 · 1 comment
Labels

Comments

@grumpyTofu
Copy link

grumpyTofu commented May 2, 2024

Current behaviour

Divider color is not changing based on theme

Expected behaviour

changing the outlineVariant value for theme should change the divider color.

How to reproduce?

image

Your Environment

software version
ios 17.4
react-native 0.73.7
react-native-paper ^5.12.3
node 21.7.3
npm or yarn yarn
expo sdk no
@grumpyTofu grumpyTofu added the bug label May 2, 2024
@gedu gedu added this to the 5.12.4 milestone May 2, 2024
@gedu
Copy link
Contributor

gedu commented May 2, 2024

Hey, I think is not a bug, looking at the material guides, is not common to change the Divider color in a Drawer. If this feature gains more visibility we will consider adding it into Drawer.Section, as a workaround you can do this:

 <>
      <Drawer.Section title="Some title" showDivider={false}>
        <Drawer.Item
          label="First Item"
          active={active === 'first'}
          onPress={() => setActive('first')}
        />
        <Drawer.Item
          label="Second Item"
          active={active === 'second'}
          onPress={() => setActive('second')}
        />
      </Drawer.Section>
      <Divider style={{backgroundColor: 'red'}} />
    </>
    ```
    hide the divider from `Drawer.Section` and add your own `Divider`.

@gedu gedu removed this from the 5.12.4 milestone May 2, 2024
@gedu gedu closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants