Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

arrow-style

radubrehar571MIT1.1.1

A simple function generating the styles needed for a DOM arrow

arrow, style, dom, arrow-style

readme

arrow-style

A simple function generating the styles needed for a DOM arrow

Install

$ npm install --save arrow-style

Usage

var arrowStyle = require('arrow-style')

var style = arrowStyle('up', {
    size: 8,
    color: 'red'
})

//style is now an object with the following properties
style = {
    borderLeft: '8px solid transparent',
    borderRight: '8px solid transparent',
    borderBottom: '8px solid red',
}
//styles generated to create a DOM arrow pointing up: