theme-ui
Advanced tools
Comparing version 0.0.4 to 0.0.5-0
13
index.js
import React, { useContext } from 'react' | ||
import { jsx } from '@emotion/core' | ||
import styled from '@emotion/styled' | ||
import { ThemeProvider as EmotionProvider } from 'emotion-theming' | ||
@@ -54,10 +55,2 @@ import { MDXProvider } from '@mdx-js/react' | ||
const styled = (tag, key) => ({ | ||
as = tag, | ||
...props | ||
}) => jsx(alias(as), { | ||
...props, | ||
css: themed(key) | ||
}) | ||
export const Styled = React.forwardRef(({ | ||
@@ -77,3 +70,3 @@ tag = 'div', // tag is used as a key in theme.styles | ||
tags.forEach(tag => { | ||
components[tag] = styled(tag, tag) | ||
components[tag] = styled(alias(tag))(props => themed(tag)(props.theme)) | ||
Styled[tag] = React.forwardRef((props, ref) => | ||
@@ -92,3 +85,3 @@ jsx(Styled, { ref, tag, ...props }) | ||
Object.keys(components).forEach(key => { | ||
next[key] = styled(components[key], key) | ||
next[key] = styled(components[key])(props => themed(key)(props.theme)) | ||
}) | ||
@@ -95,0 +88,0 @@ return next |
{ | ||
"name": "theme-ui", | ||
"version": "0.0.4", | ||
"version": "0.0.5-0", | ||
"main": "index.js", | ||
@@ -11,2 +11,3 @@ "author": "Brent Jackson <jxnblk@gmail.com>", | ||
"dependencies": { | ||
"@emotion/styled": "^10.0.10", | ||
"@styled-system/css": "^1.0.3", | ||
@@ -13,0 +14,0 @@ "css-what": "^2.1.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
560453
12
218
+ Added@emotion/styled@^10.0.10
+ Added@emotion/is-prop-valid@0.8.8(transitive)
+ Added@emotion/styled@10.3.0(transitive)
+ Added@emotion/styled-base@10.3.0(transitive)