/
githubmirror
/
carbon
Обзор
Документация
Войти
/
githubmirror
/
carbon
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/Spinner.js
49 строк
1 KB
Mike Fix
Upgrade to Next.js v11 (#1249)
13 дек 2021, 00:24
Не верифицирован
13 дек 2021, 00:24
567a9fc
Код
Авторство
О чём код?
import React from 'react' export function Spinner({ size = 24 }) { return ( <div className="bounce"> <div className="bounce-dot"></div> <div className="bounce-dot"></div> <style jsx> {` .bounce { width: ${size}px; height: ${size}px; position: relative; top: 50%; left: 50%; transform: translate(-50%, -50%); } .bounce-dot { width: 100%; height: 100%; border-radius: 50%; background-color: rgba(255, 255, 255, 0.7); opacity: 0.6; position: absolute; top: 0; left: 0; animation: bounce 2s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955); } .bounce-dot:nth-child(2) { animation-delay: -1s; } @keyframes bounce { 0%, 100% { transform: scale(0); } 45%, 55% { transform: scale(1); } } `} </style> </div> ) }