@planview/pv-utilities
v4.17.1
Published
Set of shared utilities from Planview's Design System
Downloads
7,413
Readme
@planview/pv-utilities
Implementation of Planview Design System Utilities
following the specification.
Go to the official documentation for more details
Setup
You can install @planview/pv-utilities
in multiple ways:
- With NPM
npm install styled-components --save # peerDependency
npm install @planview/pv-utilities --save
- With Yarn
yarn add styled-components # peerDependency
yarn add @planview/pv-utilities
Usage
import React from 'react'
import styled from 'styled-components'
// Set of elemental, reusable styles such as colors, sizes, spacing, text...
import { color, size } from '@planview/pv-utilities'
// You can use pv-utilities with a styled component...
const StyledButton = styled.div`
background-color: ${color.greenRegular};
`
function Component() {
return (
// ...or with a regular dom element
<div style={{ padding: `${spacing.small}px` }}>
<StyledButton>Click me</StyledButton>
</div>
)
}