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

https://github.com/jaredpalmer/emotion-jsxstyle

jsxstyle primitives powered by emotion
https://github.com/jaredpalmer/emotion-jsxstyle

css css-in-js emotion jsxstyle

Last synced: about 1 year ago
JSON representation

jsxstyle primitives powered by emotion

Awesome Lists containing this project

README

          

# emotion jsxstyle

[jsxstyle](https://github.com/smyte/jsxstyle) primitives powered by [emotion](https://github.com/emotion-js/emotion)

```sh
npm i emotion react-emotion emotion-jsxstyle
```

## Usage

```jsx
import React from 'react'
import { Block, Row } from 'emotion-jsxstyle'

const App = () => (


Hello


Goodbye


)
```

## Component Primitives

- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``

## Props

- `component`: specify the underlying DOM element. Defaults to `div`
- `props`: If you need to pass props to the underlying component, you can pass them through a special `props` props (just like jsxstyle).
- `css`: If you prefer the glamor css object syntax instead of just props, you can pass styles to a `css` prop. Useful for media queries etc.

## Refs

Just pass refs to `props` prop.

```jsx
import React from 'react'
import { Col, Block } from 'emotion-jsxstyle'

class App extends React.Component {
render() {
return (

this.input = i,
defaultValue: 'Hello',
}}/>

)
}
}
```

### Author

- Jared Palmer [@jaredpalmer](https://twitter.com/jaredpalmer)

---
MIT License