@expo/styleguide 4.3.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/components/BlockingSetInitialColorMode.js +2 -2
- package/dist/components/ThemeProvider.js +3 -3
- package/dist/expo-theme.css +252 -516
- package/dist/icons/ChangelogIcon.d.ts +3 -0
- package/dist/icons/ChangelogIcon.js +15 -0
- package/dist/icons/MoreVerticalIcon.d.ts +3 -0
- package/dist/icons/MoreVerticalIcon.js +16 -0
- package/dist/icons/OrganizationIcon.d.ts +3 -0
- package/dist/icons/OrganizationIcon.js +15 -0
- package/dist/icons/WrapLinesIcon.d.ts +3 -0
- package/dist/icons/WrapLinesIcon.js +15 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +11 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -3
- package/dist/styles/palette.d.ts +194 -222
- package/dist/styles/palette.js +41 -222
- package/dist/styles/shadows.d.ts +5 -8
- package/dist/styles/shadows.js +5 -8
- package/dist/styles/sizing.d.ts +15 -9
- package/dist/styles/sizing.js +15 -9
- package/dist/styles/themes.d.ts +391 -267
- package/dist/styles/themes.js +414 -287
- package/dist/styles/typography.js +10 -10
- package/package.json +8 -3
- package/tailwind.js +163 -0
- package/dist/styles/legacy-colors.d.ts +0 -122
- package/dist/styles/legacy-colors.js +0 -148
package/README.md
CHANGED
|
@@ -19,3 +19,12 @@ Then in a React component:
|
|
|
19
19
|
```tsx
|
|
20
20
|
import { colors, shadows, ... } from "@expo/styleguide";
|
|
21
21
|
```
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Changing styles in tailwind.config
|
|
25
|
+
|
|
26
|
+
In order to see changes made to the exported `tailwind.js` config:
|
|
27
|
+
|
|
28
|
+
- Change a value in `packages/styleguide/tailwind.js`
|
|
29
|
+
- Run yarn tsc in `packages/styleguide`
|
|
30
|
+
- Navigate to `examples/web` and restart the dev server
|
|
@@ -42,10 +42,10 @@ function setInitialColorMode() {
|
|
|
42
42
|
const colorMode = getInitialColorMode();
|
|
43
43
|
// add HTML attribute if dark mode
|
|
44
44
|
if (colorMode === 'dark') {
|
|
45
|
-
document.
|
|
45
|
+
document.body.classList.add('dark-theme');
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
document.
|
|
48
|
+
document.body.classList.remove('dark-theme');
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
// our function needs to be a string so that we can call it
|
|
@@ -76,11 +76,11 @@ function ThemeProvider(props) {
|
|
|
76
76
|
function setDocumentTheme(themeName) {
|
|
77
77
|
if (disabled)
|
|
78
78
|
return;
|
|
79
|
-
if (
|
|
80
|
-
document.
|
|
79
|
+
if (themeName === Themes.DARK) {
|
|
80
|
+
document.body.classList.add('dark-theme');
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
|
-
document.
|
|
83
|
+
document.body.classList.remove('dark-theme');
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
function onThemeChange(event) {
|