This is a collection of generic Web user interface components used in giosg services.
See DEVELOPMENT.md for instructions.
npm install @giosg/ui-components
Wrap whole application into <Root>
component (this component add global styling into page).
If you do not want to change body styling, then wrap your application into <RootWrapper>
component instead of <Root>
.
See demo page for usage examples.
See peerDependencies for additional mandatory dependencies. If you need to support IE11, you have to provide polyfills for Symbol, Map, and Set.
You can define your own theme using index.Theme
interface and take it into use with setTheme
function.
import { setTheme } from "@giosg/ui-components/src/theme/theme";
setTheme(theme);
Just be sure to call it before importing anything else from @giosg/ui-components
. Otherwise, you have to forcefully rerender already rendered components after applying the theme!
Currently active theme can be read from index.theme
, and the default theme can be read with index.getDefaultTheme()
.
Theming support is at very early stage and contains only colors (18.7.2019).
Component styles are defined using styled-components npm package and emotion