You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/guides/02-theming.mdx
-17Lines changed: 0 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,6 @@ A theme usually contains the following properties:
68
68
-`version`: specify which design system components should follow in the app
69
69
- 3 - new Material You (MD3)
70
70
- 2 - previous Material Design (MD2)
71
-
-`mode` (`'adaptive' | 'exact'`): color mode for dark theme (See [Dark Theme](#dark-theme)).
72
71
-`roundness` (`number`): roundness of common elements, such as buttons.
73
72
-`colors` (`object`): various colors used throughout different elements.
74
73
@@ -616,22 +615,6 @@ export default function FancyButton(props) {
616
615
617
616
Now you can use your `FancyButton` component everywhere instead of using `Button` from Paper.
618
617
619
-
## Dark Theme
620
-
621
-
Since 3.0 we adapt dark theme to follow [Material design guidelines](https://material.io/design/color/dark-theme.html). <br/>
622
-
In contrast to light theme, dark theme by default uses `surface` colour instead of `primary` on large components like `AppBar` or `BottomNavigation`.<br/>
623
-
The dark theme adds a white overlay with opacity depending on elevation of surfaces. It uses it for the better accentuation of surface elevation. Using only shadow is highly imperceptible on dark surfaces.
624
-
625
-
We are aware that users often use dark theme in their own ways and may not want to use the default dark theme features from the guidelines.<br/>
626
-
That's why if you are using dark theme you can switch between two dark theme `mode`s:
627
-
628
-
-`exact` where everything is like it was before. `Appbar` and `BottomNavigation` will still use primary colour by default.<br/>
629
-
-`adaptive` where we follow [Material design guidelines](https://material.io/design/color/dark-theme.html), the surface will use white overlay with opacity to show elevation, `Appbar` and `BottomNavigation` will use surface colour as a background.
630
-
631
-
If you don't use a custom theme, Paper will automatically change between the default theme and the default dark theme, depending on device settings.
632
-
633
-
Otherwise, your custom theme will need to handle it manually, using React Native's [Appearance API](https://reactnative.dev/docs/appearance).
634
-
635
618
## Gotchas
636
619
637
620
The `PaperProvider` exposes the theme to the components via [React's context API](https://reactjs.org/docs/context.html), which means that the component must be in the same tree as the `PaperProvider`. Some React Native components will render a different tree such as a `Modal`, in which case the components inside the `Modal` won't be able to access the theme. The work around is to get the theme using the `withTheme` HOC and pass it down to the components as props, or expose it again with the exported `ThemeProvider` component.
0 commit comments