@giosg/ui-components
v22.6.1
Published
[![Build Status](https://dronev1.int.giosg.com/api/badges/giosg/ui-components/status.svg)](https://dronev1.int.giosg.com/giosg/ui-components)
Downloads
327
Maintainers
Keywords
Readme
giosg UI components
This is a collection of generic Web user interface components used in giosg services.
Developing
See DEVELOPMENT.md for instructions.
How to use
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.
Theming
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).
styled-components
Component styles are defined using styled-components npm package and emotion