@notonthehighstreet/toolkit
v0.0.15
Published
A toolkit for development of front end apps at NOTHS
Maintainers
Keywords
Readme
Noths Toolkit
Installation
npm install @notonthehighstreet/toolkit --saveUsage
Import
There are two ways to import the function you need.
Import specific function
You can import just the specific function you need which means you won't require the whole toolkit module.
import colour from '@notonthehighstreet/toolkit/utils/colour';
colour('colour name')Import whole toolkit
You can import the whole toolkit and use the functions from the toolkit object.
import toolkit from '@notonthehighstreet/toolkit';
toolkit.colour('colour name')Utils
You can import multiple utils by deconstructing:
import { colour, fontSize } from '@notonthehighstreet/toolkit/utils'colour(colourName)
import colour from '@notonthehighstreet/toolkit/utils/colour';
colour('venice-blue') // => #056582fontSize(size)
import fontSize from '@notonthehighstreet/toolkit/utils/fontSize';
fontSize('m') // => 16pxbreakpoint(deviceType)
import breakpoint from '@notonthehighstreet/toolkit/utils/breakpoint';
breakpoint('mobile') // => 480