@stuart/keirin
v1.2.0
Published
Stuart's Keirin design library for web
Downloads
11
Keywords
Readme
Install the package
yarn add @stuart/keirin
If using MUI
**theme.ts file // where you create your theme to pass to the provider
import { createTheme } from "@mui/material/styles"; // used to create a default mui theme
import { keirinMuiTheme } from "@stuart/keirin"; // import the keirin theme
const defaultTheme = createTheme(); // create a default mui theme
const theme = createTheme(defaultTheme, {
...keirinMuiTheme, // extend the default mui theme with keirin
// other overrides
}
**src/shared/theme/ambient.d.ts file // add module augmentation to give you intellisense https://mui.com/material-ui/customization/theming/#custom-variables
import { keirinMuiTheme } from "@stuart/keirin"; // import the keirin theme
declare module "@mui/material/styles" {
interface Theme {
keirin: typeof keirinMuiTheme.keirin;
}
interface ThemeOptions {
keirin: typeof keirinMuiTheme.keirin;
}
}
If not using MUI
import { color, spacing, breakpoints, ... } from "@stuart/keirin"; // destructure any theme properties you want