1.3.3 • Published 6 years ago
styled-fns v1.3.3
Table of Contents
Installation
This module is distributed via npm which is bundled with node and
should be installed as one of your project's dependencies
:
npm install --save styled-fns
Usage
import {variants} from 'styled-fns'
const getColor = variants({
primary: 'blue',
secondary: 'violet',
danger: 'red',
})
This library is shipped as an ESM bundle, importing only the function you need could help reduce the size of your bundle.
API
See details in API Documentation.
Inspiration
A few utilities are inspired by other fascinating libraries:
variants
is inspired by styled-theming.
And the idea of creating this library is inspired by react-fns, we have the similar name obviously 🤷.
More features
I'm not aware of any, if you are please make a pull request and add it here!
Contributors
Thanks goes to these people (emoji key):
Jianhua Cheng💻 📖 🚇 ⚠️ |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
LICENSE
MIT