|
| 1 | +import { styled, keyframes } from 'stitches.config.js'; |
| 2 | + |
| 3 | +const Component = () => { |
| 4 | + return <Wrapper></Wrapper>; |
| 5 | +}; |
| 6 | + |
| 7 | +const donutSpin = keyframes({ |
| 8 | + '0%': { |
| 9 | + transform: 'rotate(0deg)' |
| 10 | + }, |
| 11 | + '100%': { |
| 12 | + transform: 'rotate(360deg)' |
| 13 | + } |
| 14 | +}); |
| 15 | + |
| 16 | +const Wrapper = styled('a', { |
| 17 | + display: 'inline-block', |
| 18 | + border: '4px solid rgba(255, 255, 255, 0.1)', |
| 19 | + borderLeftColor: '$white', |
| 20 | + borderRadius: '50%', |
| 21 | + width: '30px', |
| 22 | + height: '30px', |
| 23 | + animation: `${donutSpin} 1.2s linear infinite` |
| 24 | +}); |
| 25 | + |
| 26 | +const cssStyling = ` |
| 27 | +@keyframes donut-spin { |
| 28 | + 0% { |
| 29 | + transform: rotate(0deg); |
| 30 | + } |
| 31 | + 100% { |
| 32 | + transform: rotate(360deg); |
| 33 | + } |
| 34 | +} |
| 35 | +
|
| 36 | +.exampleBtn { |
| 37 | + display: inline-block; |
| 38 | + border: 4px solid rgba(255, 255, 255, 0.1); |
| 39 | + border-left-color: white; |
| 40 | + border-radius: 50%; |
| 41 | + width: 30px; |
| 42 | + height: 30px; |
| 43 | + animation: donut-spin 1.2s linear infinite; |
| 44 | +} |
| 45 | +`; |
| 46 | + |
| 47 | +const scssStyling = ` |
| 48 | +@keyframes donut-spin { |
| 49 | + 0% { |
| 50 | + transform: rotate(0deg); |
| 51 | + } |
| 52 | + 100% { |
| 53 | + transform: rotate(360deg); |
| 54 | + } |
| 55 | +} |
| 56 | +
|
| 57 | +.exampleBtn { |
| 58 | + display: inline-block; |
| 59 | + border: 4px solid rgba(255, 255, 255, 0.1); |
| 60 | + border-left-color: white; |
| 61 | + border-radius: 50%; |
| 62 | + width: 30px; |
| 63 | + height: 30px; |
| 64 | + animation: donut-spin 1.2s linear infinite; |
| 65 | +} |
| 66 | +`; |
| 67 | + |
| 68 | +export { cssStyling, scssStyling, Component }; |
0 commit comments