We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 946a4cd commit 8dd538cCopy full SHA for 8dd538c
src/util.js
@@ -68,10 +68,11 @@ export const omitEmptyValues = (obj) => {
68
}
69
70
// format keyframe styles to string
71
-export const toString = (keyframes) => {
+const defaultFormatter = (key, value) => `${key}:${value};`
72
+export const toString = (keyframes, formatter = defaultFormatter) => {
73
return Object.keys(keyframes).reduce((outer, perc) => {
74
const value = Object.keys(keyframes[perc]).reduce((inner, prop) => {
- return `${inner}${prop}:${keyframes[perc][prop]};`
75
+ return `${inner}${formatter(prop, keyframes[perc][prop])}`
76
}, '')
77
return `${outer}${perc}{${value}}`
78
0 commit comments