aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Spinner.js
blob: 6cd28cb8f760a64016f4f80a3395f232a46cf358 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { memo } from 'react';
import ContentLoader from 'react-content-loader';

function Spinner(props) {
    return (
        <div className="msg-cont">
            <div className="msg-txt">
                <ContentLoader
                    speed={2}
                    primarycolor="#f8f8f8"
                    secondarycolor="#ecebeb"
                    {...props}>
                    <rect x="56" y="6" rx="0" ry="0" width="117" height="6.4" />
                    <rect x="56" y="20" rx="0" ry="0" width="85" height="6.4" />
                    <rect x="0" y="60" rx="0" ry="0" width="270" height="6.4" />
                    <rect x="0" y="78" rx="0" ry="0" width="270" height="6.4" />
                    <rect x="0" y="96" rx="0" ry="0" width="201" height="6.4" />
                    <rect x="0" y="0" rx="0" ry="0" width="48" height="48" />
                    <rect x="0" y="120" rx="0" ry="0" width="270" height="1" />
                </ContentLoader>
            </div>
        </div>
    );
}

export default memo(Spinner);

/**
 * 
 * @param { import('react').PropsWithChildren<{}> } props
 */
export function ChatSpinner(props) {
    return (
        <ContentLoader
            speed={2}
            primaryColor="#f8f8f8"
            secondaryColor="#ecebeb"
            height="60px"
            width="120px"
            {...props}>
            <rect x="56" y="6" rx="0" ry="0" width="117" height="6.4" />
            <rect x="56" y="20" rx="0" ry="0" width="85" height="6.4" />
            <rect x="0" y="0" rx="0" ry="0" width="48" height="48" />
        </ContentLoader>
    );
}