DocSpace-client/packages/components/theme-provider
2023-05-26 16:42:32 +03:00
..
index.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
README.md Web:Components:Add currentColorScheme in readme. 2023-05-26 16:42:32 +03:00
theme-provider.js Web:Delete name portalTheme. 2023-05-25 12:07:03 +03:00
theme-provider.stories.js Web:Fix name. 2023-05-26 16:40:38 +03:00
theme-provider.test.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03: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/components/theme-provider";
import Themes from "@docspace/components/themes";
const newTheme = {...Themes.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