Skip to content

Commit

Permalink
chore(gatsby): migrate spinner to typescript (#22080)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naturalclar authored Mar 9, 2020
1 parent f0d02dc commit 33de224
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
3 changes: 1 addition & 2 deletions packages/gatsby-cli/src/reporter/loggers/ink/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import { Box, Static } from "ink"
import isTTY from "../../../util/is-tty"
import { trackBuildError } from "gatsby-telemetry"

import Spinner from "../ink/components/spinner"
import { Spinner } from "../ink/components/spinner"
import { ProgressBar } from "../ink/components/progress-bar"

import { Message } from "../ink/components/messages"
import Error from "./components/error"
import Develop from "../ink/components/develop"
Expand Down
16 changes: 0 additions & 16 deletions packages/gatsby-cli/src/reporter/loggers/ink/components/spinner.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from "react"
import { Box } from "ink"
import InkSpinner from "ink-spinner"

interface IProps {
text: string
statusText?: string
}
export function Spinner({ text, statusText }: IProps): JSX.Element {
let label = text
if (statusText) {
label += ` — ${statusText}`
}

return (
<Box>
<InkSpinner type="dots" /> {label}
</Box>
)
}

0 comments on commit 33de224

Please sign in to comment.