Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nju33/togettheme
https://github.com/nju33/togettheme
styled-components utility
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nju33/togettheme
- Owner: nju33
- Created: 2018-02-07T08:30:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-28T03:02:57.000Z (over 6 years ago)
- Last Synced: 2024-04-14T12:49:45.165Z (9 months ago)
- Topics: styled-components, utility
- Language: JavaScript
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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'
```