Skip to content

Commit 89e8fdb

Browse files
committed
add fallback loader before load theme
1 parent 5799125 commit 89e8fdb

File tree

3 files changed

+278
-163
lines changed

3 files changed

+278
-163
lines changed

apps/docs/src/content/docs/api/provider.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ Provider component is used to wrap your app content and provide the theme contex
1111
|------|------|---------|-------------|
1212
| `children` | <a href='https://reactnative.dev/docs/react-node'>`ReactNode`</a> | - | App content wrapped by the provider |
1313
| `defaultTheme?` | <a href='/api/theme#thememode'>`ThemeMode`</a> | `'system'` | Sets the initial theme mode. `'system'` follows device preference |
14-
| `customDarkTheme` | <a href='/api/theme#theme'>`Partial<Theme>`</a> | `undefined` | Custom theme configuration for dark mode |
15-
| `customLightTheme` | <a href='/api/theme#theme'>`Partial<Theme>`</a> | `undefined` | Custom theme configuration for light mode |
16-
| `bottomSheetProps` | <a href='/api/provider#bottomsheetprops'>`BottomSheetProps`</a> | `{}` | Global props for bottom sheet components |
17-
| `toast` | <a href='/api/provider#toastconfig'>`ToastConfig`</a> | `{}` | Configuration for toast notifications |
18-
| `i18nConfig` | <a href='/api/provider#i18nconfig'>`I18nConfig`</a> | `undefined` | Internationalization configuration |
19-
| `scrollToHideProps` | <a href='/api/provider#scrolltohideprops'>`ScrollToHideProps`</a> | `undefined` | Configuration for scroll-to-hide behavior |
20-
| `themeStorageKeyName?` | `string` | `undefined` | Configuration for key name storage |
14+
| `customDarkTheme?` | <a href='/api/theme#theme'>`Partial<Theme>`</a> | `undefined` | Custom theme configuration for dark mode |
15+
| `customLightTheme?` | <a href='/api/theme#theme'>`Partial<Theme>`</a> | `undefined` | Custom theme configuration for light mode |
16+
| `bottomSheetProps?` | <a href='/api/provider#bottomsheetprops'>`BottomSheetProps`</a> | `{}` | Global props for bottom sheet components |
17+
| `toast?` | <a href='/api/provider#toastconfig'>`ToastConfig`</a> | `{}` | Configuration for toast notifications |
18+
| `i18nConfig?` | <a href='/api/provider#i18nconfig'>`I18nConfig`</a> | `undefined` | Internationalization configuration |
19+
| `scrollToHideProps?` | <a href='/api/provider#scrolltohideprops'>`ScrollToHideProps`</a> | `undefined` | Configuration for scroll-to-hide behavior |
20+
| `themeStorageKeyName?` | `string` | `'RNC_THEME'` | Custom key name for theme storage in AsyncStorage |
21+
| `showLoadingSplash?` | `boolean` | `true` | Whether to show loading splash screen while theme is initializing |
22+
| `loadingComponent?` | `ReactNode` | `undefined` | Custom loading component to display during theme initialization |
23+
| `splashDuration?` | `number` | `150` | Minimum splash duration in milliseconds to prevent flash |
24+
| `fallbackTheme?` | `'light' \| 'dark'` | `'light'` | Fallback theme to use when system theme is unavailable |
2125

2226
### BottomSheetProps
2327

libs/rnc-theme/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rnc-theme",
3-
"version": "0.1.1",
3+
"version": "0.1.11",
44
"funding": {
55
"type": "github",
66
"url": "https://github.com/masumrpg/react-native-components"

0 commit comments

Comments
 (0)