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
|`dataProvider`| Required |`DataProvider`| - | The data provider for fetching resources |
142
+
|`children`| Required |`ReactNode`| - | The routes to render |
143
+
|`authCallbackPage`| Optional |`Component`|`AuthCallback`| The content of the authentication callback page |
144
+
|`authProvider`| Optional |`AuthProvider`| - | The authentication provider for security and permissions |
145
+
|`basename`| Optional |`string`| - | The base path for all URLs |
146
+
|`catchAll`| Optional |`Component`|`NotFound`| The fallback component for unknown routes |
147
+
|`dashboard`| Optional |`Component`| - | The content of the dashboard page |
148
+
|`darkTheme`| Optional |`object`| - | The dark theme configuration |
149
+
|`defaultTheme`| Optional |`boolean`|`false`| Flag to default to the light theme |
150
+
|`disableTelemetry`| Optional |`boolean`|`false`| Set to `true` to disable telemetry collection |
151
+
|`i18nProvider`| Optional |`I18NProvider`| - | The internationalization provider for translations |
152
+
|`layout`| Optional |`Component`|`Layout`| The content of the layout |
153
+
|`loginPage`| Optional |`Component`|`LoginPage`| The content of the login page |
154
+
|`notification`| Optional |`Component`|`Notification`| The notification component |
155
+
|`queryClient`| Optional |`QueryClient`| - | The react-query client |
156
+
|`ready`| Optional |`Component`|`Ready`| The content of the ready page |
157
+
|`requireAuth`| Optional |`boolean`|`false`| Flag to require authentication for all routes |
158
+
|`store`| Optional |`Store`| - | The Store for managing user preferences |
159
+
|`theme`| Optional |`object`| - | The main (light) theme configuration |
160
+
|`title`| Optional |`string`| - | The error page title |
161
161
162
162
163
163
## `dataProvider`
@@ -447,13 +447,13 @@ const App = () => (
447
447
);
448
448
```
449
449
450
-
**Tip**: To disable OS preference detection and always use the light theme, see the [`defaultToLightTheme`](#defaulttolighttheme) prop.
450
+
**Tip**: To disable OS preference detection and always use one theme by default, see the [`defaultTheme`](#defaulttheme) prop.
451
451
452
-
## `defaultToLightTheme`
452
+
## `defaultTheme`
453
453
454
454
If you provide both a `lightTheme` and a `darkTheme`, react-admin will choose the default theme to use for each user based on their OS preference. This means that users using dark mode will see the dark theme by default. Users can then switch to the other theme using [the `<ToggleThemeButton>` component](./ToggleThemeButton.md).
455
455
456
-
If you prefer to always default to the light theme regardless of the user's OS preference, you can set the `defaultToLightTheme` prop to `true`:
456
+
If you prefer to always default to the light or the dark theme regardless of the user's OS preference, you can set the `defaultTheme` prop to either `light` or `dark`:
0 commit comments