Download wp-calypso/packages/composite-checkout/src/components/spinner.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/composite-checkout/src/components/spinner.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/composite-checkout/src/components/spinner.tsx
-
curl -L -o spinner.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/composite-checkout/src/components/spinner.tsx
1.19 kB
| import { keyframes } from '@emotion/react'; | |
| import styled from '@emotion/styled'; | |
| const rotate = keyframes` | |
| 100% { | |
| transform: rotate( 360deg ); | |
| } | |
| `; | |
| const SpinnerWrapper = styled.div` | |
| display: block; | |
| width: 20px; | |
| height: 20px; | |
| border: 3px solid transparent; | |
| border-top-color: ${ ( props ) => props.theme.colors.highlight }; | |
| border-radius: 100%; | |
| box-sizing: border-box; | |
| position: relative; | |
| animation: ${ rotate } 3s linear infinite; | |
| animation-fill-mode: backwards; | |
| ::after { | |
| position: absolute; | |
| top: 0; | |
| left: -1px; | |
| width: 17px; | |
| height: 17px; | |
| border: 3px solid transparent; | |
| border-top-color: ${ ( props ) => props.theme.colors.highlight }; | |
| border-right-color: ${ ( props ) => props.theme.colors.highlight }; | |
| box-sizing: border-box; | |
| opacity: 0.5; | |
| content: ''; | |
| border-radius: 100%; | |
| animation: ${ rotate } 3s linear infinite; | |
| animation-fill-mode: backwards; | |
| .rtl & { | |
| border-right-color: transparent; | |
| border-left-color: ${ ( props ) => props.theme.colors.highlight }; | |
| right: -1px; | |
| left: auto; | |
| } | |
| } | |
| `; | |
| export default function Spinner( { className }: { className?: string } ) { | |
| return <SpinnerWrapper className={ className } />; | |
| } | |