You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
457 B
24 lines
457 B
// @flow
|
|
import css from './css'
|
|
|
|
type Keyframes = {|
|
|
name: string,
|
|
styles: string,
|
|
anim: 1,
|
|
toString: () => string
|
|
|} & string
|
|
|
|
export const keyframes = (...args: *): Keyframes => {
|
|
let insertable = css(...args)
|
|
const name = `animation-${insertable.name}`
|
|
// $FlowFixMe
|
|
return {
|
|
name,
|
|
styles: `@keyframes ${name}{${insertable.styles}}`,
|
|
anim: 1,
|
|
toString() {
|
|
return `_EMO_${this.name}_${this.styles}_EMO_`
|
|
}
|
|
}
|
|
}
|