Update animation plugin to use nameClass

This commit is contained in:
Adam Wathan 2020-10-16 10:35:13 -04:00
parent 6180627d6c
commit b84049fb8e

View file

@ -1,7 +1,8 @@
import _ from 'lodash'
import nameClass from '../util/nameClass'
export default function() {
return function({ addUtilities, e, theme, variants }) {
return function({ addUtilities, theme, variants }) {
const keyframesConfig = theme('keyframes')
const keyframesStyles = _.fromPairs(
_.toPairs(keyframesConfig).map(([name, keyframes]) => {
@ -14,7 +15,7 @@ export default function() {
const utilities = _.fromPairs(
_.toPairs(animationConfig).map(([suffix, animation]) => {
return [
`.${e(`animate-${suffix}`)}`,
nameClass('animate', suffix),
{
animation,
},