Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 42 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
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 |