Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentcdodds/glamorous.macro
https://github.com/kentcdodds/glamorous.macro
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kentcdodds/glamorous.macro
- Owner: kentcdodds
- Created: 2018-01-31T05:18:35.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2021-01-25T23:14:08.000Z (over 3 years ago)
- Last Synced: 2024-04-18T10:14:33.972Z (5 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# glamorous.macro
[![Babel Macro][macros-badge]][babel-plugin-macros]
This is a [`babel-plugin-macros`][babel-plugin-macros] macro for
[`babel-plugin-glamorous-displayname`][babel-plugin-glamorous-displayname].Please see those projects for more information.
## Installation
This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's `devDependencies`:```
npm install --save-dev glamorous.macro
```You'll also need to install and configure [`babel-plugin-macros`][babel-plugin-macros] if you
haven't already.## Usage
Once you've [configured `babel-plugin-macros`](https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/user.md)
you can import/require `glamorous.macro`. For example:```js
import glamorous from 'glamorous.macro'const MyStyledInput = glamorous.input({
/* your styles */
})
```**Note**:
You basically can replace all usage of the default export of glamorous with `glamorous.macro`. However, `glamorous.macro` does _not_ support named exports
for built-in components.[npm]: https://www.npmjs.com/
[node]: https://nodejs.org
[babel-plugin-macros]: https://github.com/kentcdodds/babel-plugin-macros
[babel-plugin-glamorous-displayname]: https://github.com/bernard-lin/babel-plugin-glamorous-displayname
[macros-badge]: https://img.shields.io/badge/babel--macro-%F0%9F%8E%A3-f5da55.svg?style=flat-square
[babel-plugin-macros]: https://github.com/kentcdodds/babel-plugin-macros