Theme
Setup
You can control you theme by theme props in ThemeProvider
import {
CurrentTheme,
defaultSpaces,
getShadows,
ThemeProvider,
} from '@lad-tech/mobydick-core';
import {Navigation} from '@pages/Navigation';
import {themeColors} from '@shared/lib/theme';
import {fonts} from '@shared/lib/theme/deafultFont';
function App() {
return (
<ThemeProvider
theme={{
currentTheme: CurrentTheme.light,
colors: themeColors,
spaces: {
...defaultSpaces,
},
fonts: fonts,
shadows: getShadows({
spaces: defaultSpaces,
currentTheme: CurrentTheme.light,
}),
}}>
<Navigation />
</ThemeProvider>
);
}
export default App
Props
RequiredcurrentTheme
TYPE |
---|
string |
Name one of theme
Requiredcolors
TYPE |
---|
colors |
All possible colors group by theme
Requiredspaces
TYPE |
---|
space |
All possible spaces
Requiredfonts
TYPE |
---|
fonts |
Map for font
Requiredshadows
TYPE |
---|
shadow |
Map for shadow