Completed
Push — main ( 8ca39d...9cc399 )
by Cataldo
03:32
created

playground/src/pages/Spinner/index.tsx   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 42
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 33
mnd 1
bc 1
fnc 0
dl 0
loc 42
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
rs 10
1
import { BooleanProp, Demo, SelectProp } from "@cianciarusocataldo/demo-ui";
2
3
import { DEMO_COMMON_PROPS } from "app/constants/demo-props";
4
5
import { Spinner } from "modular-ui-preview";
6
import { ComponentPage } from "app/components/ComponentPage";
7
8
const SpinnerPage = () => (
9
  <ComponentPage name="Spinner">
10
    <Demo
11
      label="Spinner"
12
      props={{
13
        value: SelectProp({
14
          "Not set": undefined,
15
          success: "success",
16
          error: "error",
17
          loading: "loading",
18
        }),
19
        ...DEMO_COMMON_PROPS,
20
        shadow: BooleanProp(false),
21
      }}
22
    >
23
      {(props: any) => (
24
        <div
25
          style={{
26
            display: "flex",
27
            flexDirection: "column",
28
            alignItems: "center",
29
          }}
30
        >
31
          <Spinner
32
            {...props}
33
            className={props.className.length > 0 ? props.className : "w-32"}
34
          />
35
        </div>
36
      )}
37
    </Demo>
38
  </ComponentPage>
39
);
40
41
export default SpinnerPage;
42