🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

euphoria-colors

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

euphoria-colors

CSS-in-JS utils for colors.

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

euphoria-colors

!!!!!!!!!!!!!!!!!!!!!!! MOVED TO Euphoria!!!!!!!!!!!!!!!!!

A Euphoria.css utility library to create color classes in your CSS-to-JS projects.

This module returns a string of class names you can then inject into a page, using something like glamor.

NOTE: Currently this only works with ES6 support using Babel or Node 7.x+.

Installation

# with yarn:
yarn add euphoria-colors

# with npm
npm i -S euphoria-colors

Usage

This module can be used in many ways. For example, using glamor, you would do the following:

import { css } from 'glamor'
import colors from 'euphoria-colors'

css.insert(
  colors({
    primary: '#ff6600',
    danger: 'crimson',
    blue: 'blue',
  })
)

Now you will have the following classes available to you:

// Text colors
.text-primary { color: #ff6600; }
.text-danger { color: crimson; }
.text-blue { color: blue; }

// Background colors
.bg-primary { background: #ff6600; }
.bg-danger { background: crimson; }
.bg-blue { background: blue; }

Calling colors without arguments will get you the default colors mapping, which is:

{
  primary: 'lightseagreen',
  success: 'forestgreen',
  info: 'teal',
  warning: 'orange',
  danger: 'crimson',
}

Changelog

v0.1.0

  • Initial release!

License

MIT

Credits

Dana Woodman

FAQs

Package last updated on 31 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts