Skip to content

Commit

Permalink
Add emotion system to the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye Hohenberger committed Sep 25, 2017
1 parent d89fae5 commit efd73e0
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
47 changes: 47 additions & 0 deletions packages/emotion-system/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "emotion-system",
"version": "8.0.2-5",
"description": "emotion and styled-system",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"files": [
"src",
"dist"
],
"scripts": {
"build": "npm-run-all clean rollup rollup:umd",
"clean": "rimraf dist",
"rollup": "rollup -c ../../rollup.config.js",
"watch": "rollup -c ../../rollup.config.js --watch",
"rollup:umd": "UMD=true rollup -c ../../rollup.config.js"
},
"dependencies": {
"babel-plugin-emotion": "^8.0.2-5",
"emotion-utils": "^8.0.2-3"
},
"peerDependencies": {
"emotion": "^8.0.2-5",
"react-emotion": "^8.0.2-5"
},
"devDependencies": {
"emotion": "^8.0.2-5",
"react-emotion": "^8.0.2-5",
"npm-run-all": "^4.0.2",
"rimraf": "^2.6.1",
"rollup": "^0.43.0"
},
"author": "Kye Hohenberger",
"homepage": "https://github.com/tkh44/emotion#readme",
"license": "MIT",
"repository": "https://github.com/tkh44/emotion/tree/master/packages/emotion-system",
"keywords": [
"styles",
"emotion",
"react",
"css",
"css-in-js"
],
"bugs": {
"url": "https://github.com/emotion-js/emotion/issues"
}
}
26 changes: 26 additions & 0 deletions packages/emotion-system/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import styled, { css } from 'react-emotion'
import { space, width, fontSize, color, responsiveStyle } from 'styled-system'

export const display = responsiveStyle('display')
export const flex = responsiveStyle('flex')
export const order = responsiveStyle('order')
const wrap = responsiveStyle('flex-wrap', 'wrap', 'wrap')
const direction = responsiveStyle('flexDirection', 'direction')
const align = responsiveStyle('alignItems', 'align')
const justify = responsiveStyle('justifyContent', 'justify')
const column = props => (props.column ? css`flex-direction: column;` : null)

export default styled('div')`
${display};
${space};
${width};
${fontSize};
${color};
${flex};
${order};
${wrap};
${column};
${direction};
${align};
${justify};
`

0 comments on commit efd73e0

Please sign in to comment.