-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.tsx
More file actions
32 lines (24 loc) · 806 Bytes
/
index.tsx
File metadata and controls
32 lines (24 loc) · 806 Bytes
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
// File: ProgressIndicators.tsx
import React from 'react';
import {
MdLinearProgress,
} from '@material/web/progress/linear-progress';
import {
MdCircularProgress,
} from '@material/web/progress/circular-progress';
import { createComponent } from '@lit/react';
export const CircularProgress = createComponent({
tagName: 'md-circular-progress',
elementClass: MdCircularProgress,
react: React,
});
export const LinearProgress = createComponent({
tagName: 'md-linear-progress',
elementClass: MdLinearProgress,
react: React,
});
const Progress = (props: any) => {
if (props.variant === 'md-linear-progress') return <LinearProgress {...props}>{props.children}</LinearProgress>;
return <CircularProgress {...props}>{props.children}</CircularProgress>;
};
export default Progress;