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: README.md
+57-13Lines changed: 57 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,15 @@ No additional steps are necessary.
27
27
## Usage
28
28
<details><summary>Theme</summary>
29
29
<br />
30
+
30
31
## Basic usage
31
32
32
33
You don't need extra steps to use the default theme via whole app. The default theme is ***light***.
33
34
34
35
35
-
## Custom theme
36
+
## Custom Theme
36
37
37
-
**You need to wrap whole app in ```ThemeContainer```**
38
+
**You need to wrap whole app in ```MaterialComponentsProvider```**
38
39
39
40
This library provides an opportunity to automatically create themes from target colors. ```buildThemesFromColors``` function takes theme colors and returns light and dark themes.
40
41
Each theme color must be one of the next color formats: hex, rgb or rgba.
Also, you can create a custom theme manually and pass it as a property to the ThemeContainer component. (hint: Check Theme interface provided by the library)
67
+
Also, you can create a custom theme manually and pass it as a property to the MaterialComponentsProvider component. (hint: Check Theme interface provided by the library)
67
68
68
69
## Themes provided via the library
69
70
70
71
This library provides _dark_ and _light_ themes e.g. on iOS 13+ and Android 10+, you can get user's preferred color scheme ('dark' or 'light') with the ([Appearance API](https://reactnative.dev/docs/appearance)).
71
72
72
-
**You need to wrap whole app in ```ThemeContainer```**
73
+
**You need to wrap whole app in ```MaterialComponentsProvider```**
73
74
74
75
```
75
76
import {useColorScheme} from 'react-native';
76
-
import {ThemeContainer, DarkTheme, LightTheme} from '@computools/react-native-material-components';
77
+
import {MaterialComponentsProvider, DarkTheme, LightTheme} from '@computools/react-native-material-components';
0 commit comments