Helper for generating keyframes with a unique id in jss
npm install jss-keyframesHelper for generating keyframes with a unique id in jss
> yarn add jss-keyframes
``js
import keyframes from 'jss-keyframes';
const animationName = keyframes({
from: { transform: 'scale(1)' },
to: { transform: 'scale(0)' },
});
`
The keyframes function return the name of the animation.
The keyframes function accepts a second object for some options.
`js``
type Options = {
// Jss instance to be used
// It will generate a separate stylesheet for every instance
jss: Jss
// A name to better identify the animation
// Example: { name: 'button' } would return button-1
// This option will default to animation
name: string
}