diff --git a/package.json b/package.json index dff8aad..d5284c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mystical", "description": "CSS prop constraint based styling", - "version": "7.0.0", + "version": "8.0.0", "author": "David Burles", "license": "MIT", "repository": "github:dburles/mystical", diff --git a/src/lib/index.js b/src/lib/index.js index 470252e..6c0341b 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -8,7 +8,7 @@ exports.useModifiers = require('./useModifiers.js'); exports.jsx = require('./jsx.js'); exports.Global = require('./Global.js'); exports.cloneElement = require('./cloneElement.js'); -exports.useKeyframes = require('./useKeyframes.js'); exports.InitializeColorMode = require('./InitializeColorMode.js'); exports.defaultColorMode = require('./defaultColorMode.js'); exports.darkColorMode = require('./darkColorMode'); +exports.keyframes = require('@emotion/react').keyframes; diff --git a/src/lib/useKeyframes.js b/src/lib/useKeyframes.js deleted file mode 100644 index 1471c97..0000000 --- a/src/lib/useKeyframes.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const { keyframes } = require('@emotion/react'); -const { useMemo } = require('react'); - -const useKeyframes = (styles) => { - const stringifiedStyles = JSON.stringify(styles); - const animation = useMemo(() => { - return keyframes(styles); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [stringifiedStyles]); - - return animation; -}; - -module.exports = useKeyframes;