Loading.tsx 440 B

123456789101112131415
  1. import React from "react";
  2. import { Button, Spinner } from "react-bootstrap";
  3. const Loading = (props: { target?: string }) => {
  4. const { target } = props;
  5. const title = target ? `Fetching ${target}` : "Connecting to Websocket";
  6. return (
  7. <Button variant="warning" className="m-1 py-0 mr-2">
  8. <Spinner animation="border" variant="dark" size="sm" className="mr-1" />
  9. {title}
  10. </Button>
  11. );
  12. };
  13. export default Loading;