GV React Component Library
This component library is built using react-styleguidist, documenting the layouts, design patterns and components to be used across our sites and products.
This component library is built using react-styleguidist, documenting the layouts, design patterns and components to be used across our sites and products.
GV-CL has a dependency of styled-components.
yarn add gv-component-library
import { ThemeProvider, theme as mainTheme } from 'gv-component-library';
import { Banner } from 'gv-component-library';
Hide Visually
import { hideVisually } from 'gv-component-library';
how to use in your styled component
export const Component = styled.span'${hideVisually};';
Check if a url is whiteListed. Used to check links and change link target.
Z Index
import { zIndex } from 'gv-component-library';
how to use in your styled component
export const Component = styled.span'${zIndex('high')};';
Spacing
import { spacing } from 'gv-component-library';
Default spacing scale
One spacing unit is equal to 0.25rem, which translates to 4px by default in common browsers.
Name | Size |
---|---|
none | 0 |
xsm | 0.25rem |
sm | 0.25rem |
md | 1rem |
l | 2rem |
xl | 4rem |
xxl | 8rem |
xxxl | 16rem |
how to use in your styled component
export const Component = styled.span'
padding: ${spacing('md)'} ${spacing('l)'};';
Button
Custom Size.
Single image
Long copy/Message field
Long copy/Message field
Card
Full width Card.
Custom width Card.
0.0.0-see.readme