Skip to content

[React Style] How To Use Keyframes?

Hill Liu edited this page Nov 20, 2020 · 1 revision
Table of Contents

Syntax

React Style

import { reactStyle } from 'react-atomic-molecule';

const Styles = { 
    loading: reactStyle({
        animation: ['spin 1s infinite linear']
    }), 
    spin: reactStyle([
        {   
            transform: ['rotateZ(0deg)']
        },  
        {   
            transform: ['rotateZ(360deg)']
        }   
    ],['@keyframes spin','0%','100%'])
};

W3C

Clone this wiki locally