Elffuss BraidHub

kikocis/continue public

main · 825 BRawPermalink
1import { useSelector } from "react-redux";
2import { RootState } from "../../redux/store";
3import styled from "styled-components";
4import { PlayIcon } from "@heroicons/react/24/outline";
5
6const DEFAULT_SIZE = "28px";
7
8const FlashingDiv = styled.div`
9 margin-top: 16px;
10 margin: auto;
11 width: ${DEFAULT_SIZE};
12 animation: flash 1.2s infinite ease-in-out;
13 @keyframes flash {
14 0% {
15 opacity: 0.4;
16 }
17 50% {
18 opacity: 1;
19 }
20 100% {
21 opacity: 0.4;
22 }
23 }
24`;
25
26function Loader(props: { size?: string }) {
27 const vscMediaUrl = window.vscMediaUrl;
28 return (
29 <FlashingDiv>
30 {vscMediaUrl ? (
31 <img src={`${vscMediaUrl}/play_button.png`} width="22px" />
32 ) : (
33 <PlayIcon width={props.size || DEFAULT_SIZE} />
34 )}
35 </FlashingDiv>
36 );
37}
38
39export default Loader;