summaryrefslogtreecommitdiff
path: root/packages/create-astro/src/components/Spinner.tsx
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2021-06-08 08:10:56 -0700
committerGravatar GitHub <noreply@github.com> 2021-06-08 11:10:56 -0400
commit6bca7c83a7e2d62015f45f873b0f69f11b4d902b (patch)
tree5662630e51c6e6e743785d308785cff2e47568f0 /packages/create-astro/src/components/Spinner.tsx
parent9594447335b7fa15f82c0789f18a3fe02ec20d70 (diff)
downloadastro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.tar.gz
astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.tar.zst
astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.zip
redesign create-astro (#301)
* redesign create astro * add changeset * Use npm start * Update the astro version * Adds the changeset Co-authored-by: Fred Schott <fks@Freds-MBP.attlocal.net> Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Diffstat (limited to 'packages/create-astro/src/components/Spinner.tsx')
-rw-r--r--packages/create-astro/src/components/Spinner.tsx200
1 files changed, 0 insertions, 200 deletions
diff --git a/packages/create-astro/src/components/Spinner.tsx b/packages/create-astro/src/components/Spinner.tsx
deleted file mode 100644
index fa62b614f..000000000
--- a/packages/create-astro/src/components/Spinner.tsx
+++ /dev/null
@@ -1,200 +0,0 @@
-import React, { FC, useEffect, useState } from 'react';
-import { Box, Text } from 'ink';
-
-const Spinner: FC<{ type?: keyof typeof spinners }> = ({ type = 'countdown' }) => {
- const { interval, frames } = spinners[type];
- const [i, setI] = useState(0);
- useEffect(() => {
- const _ = setInterval(() => {
- setI((v) => (v < frames.length - 1 ? v + 1 : 0));
- }, interval);
-
- return () => clearInterval(_);
- }, []);
-
- return frames[i];
-};
-
-const spinners = {
- countdown: {
- interval: 80,
- frames: [
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083"> </Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#882DE7"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#6858F1"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- <Text backgroundColor="#23B1AF"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#17C083">{' '}</Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7"> </Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#23B1AF"> </Text>
- <Text backgroundColor="#17C083"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- <Text backgroundColor="#23B1AF"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- <Text backgroundColor="#2CA5D2"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- <Text backgroundColor="#3894FF"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- <Text backgroundColor="#6858F1"> </Text>
- <Text backgroundColor="#5076F9"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- <Text backgroundColor="#6858F1"> </Text>
- </Box>,
- <Box display="flex">
- <Text backgroundColor="#882DE7">{' '}</Text>
- </Box>,
- ],
- },
-};
-
-export default Spinner;