Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nju33/togettheme


https://github.com/nju33/togettheme

styled-components utility

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# togettheme

[![CircleCI](https://circleci.com/gh/nju33/togettheme.svg?style=svg)](https://circleci.com/gh/nju33/togettheme)

## Install

```bash
yarn add togettheme
```

## Example

```javascript
const togettheme = require('togettheme');

const defaultValues = {
color: 'orange',
background: '#444'
};

const theme = togettheme(defaultValues);

const data = {
theme: {
color: 'blue',
}
}

console.log(theme`color`(data)) // 'blue'
console.log(theme`background`(data)) // '#444'
```