File tree Expand file tree Collapse file tree 3 files changed +23
-8
lines changed
Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export {
1111 ThemeContext ,
1212 Global ,
1313 ClassNames ,
14+ keyframes ,
1415} from '@emotion/core'
1516export { ThemeProvider , withTheme , useTheme } from 'emotion-theming'
1617export * from './breakpoints'
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from 'react'
22import '@testing-library/jest-dom/extend-expect'
33import { render , cleanup } from '@testing-library/react'
44import { ThemeProvider } from 'emotion-theming'
5- import styled , { css } from '.'
5+ import styled , { css , keyframes } from '.'
66
77afterEach ( cleanup )
88
@@ -34,6 +34,27 @@ describe('#styled', () => {
3434 ` )
3535 } )
3636
37+ it ( 'works with keyframes' , ( ) => {
38+ const animation = keyframes `
39+ from {
40+ transform: translateX(0%);
41+ }
42+
43+ to {
44+ transform: translateX(100%);
45+ }
46+ `
47+ const Dummy = styled . div `
48+ ${ css `
49+ animation: ${ animation } ;
50+ ` }
51+ `
52+
53+ const { container } = render ( < Dummy /> )
54+
55+ expect ( container . firstChild ) . toHaveStyle ( `animation: ${ animation . name } ;` )
56+ } )
57+
3758 it ( 'reads value from the theme' , ( ) => {
3859 const theme = {
3960 colors : {
Original file line number Diff line number Diff line change @@ -3224,13 +3224,6 @@ browser-process-hrtime@^1.0.0:
32243224 resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626"
32253225 integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
32263226
3227- browser-resolve@^2.0.0 :
3228- version "2.0.0"
3229- resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-2.0.0.tgz#99b7304cb392f8d73dba741bb2d7da28c6d7842b"
3230- integrity sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==
3231- dependencies :
3232- resolve "^1.17.0"
3233-
32343227browserify-aes@^1.0.0, browserify-aes@^1.0.4 :
32353228 version "1.2.0"
32363229 resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48"
You can’t perform that action at this time.
0 commit comments