No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

ThemeProvider

Container used to define the theme and color scheme to use.

usage
import { ThemeProvider, ThemeContext, useThemeContext, ColorSchemeContext, useColorSchemeContext } from "@sharegate/orbit-ui";
sources
Github

Usage

Orbit components rely on the ThemeProvider to define the theme and color scheme they need to render accurately. We recommended you declare a theme provider at the root of your application but if you prefer, you can declare them as needed instead.

<ThemeProvider theme={ShareGateTheme} colorScheme="system" defaultColorScheme="light">
<Button variant="secondary">Cutoff</Button>
</ThemeProvider>

API

ThemeProvider

usage
import { ThemeProvider } from "@sharegate/orbit-ui";
NameDescriptionDefault
children*
React children
string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal
-
colorScheme*
The color scheme to use.
"light""dark""system"
-
defaultColorScheme
Default color scheme to use when a user preferred color scheme (system) is not available.
"light""dark"
-
theme*
The theme to use.
OrbitTheme
-