DocSpace-client/packages/shared/components/theme-provider
2024-03-21 18:09:55 +04:00
..
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Shared: refactoring and apply code guide style 2023-12-05 19:52:30 +03:00
ThemeProvider.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ThemeProvider.types.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00

ThemeProvider

Custom theme provider based on Theme Provider.

List of themes:

You can change the CSS styles in the theme, and they will be applied to all children components of ThemeProvider

Usage

import ThemeProvider from "@docspace/shared/components";
import { Base } from "@docspace/shared/themes";
const newTheme = {...Base, color: "red"}

<ThemeProvider theme={newTheme}>
  <Box>
    <Text>Base theme</Text>
  </Box>
</ThemeProvider>;

ThemeProvider Properties

Props Type Required Values Default Description
theme object - Base styles Applies a theme to all children components
currentColorScheme object, boolean - - Applies a colorTheme to all children components