reorganize code into smaller files & dirs
This commit is contained in:
21
packages/app/src/Components/Progress/Progress.tsx
Normal file
21
packages/app/src/Components/Progress/Progress.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import "./Progress.css";
|
||||
import { FormattedNumber } from "react-intl";
|
||||
import { CSSProperties, ReactNode } from "react";
|
||||
|
||||
export default function Progress({ value, status }: { value: number; status?: ReactNode }) {
|
||||
const v = Math.max(0.01, Math.min(1, value));
|
||||
return (
|
||||
<div className="progress">
|
||||
<div
|
||||
style={
|
||||
{
|
||||
"--progress": `${v * 100}%`,
|
||||
} as CSSProperties
|
||||
}></div>
|
||||
<span>
|
||||
{status}
|
||||
<FormattedNumber value={v} style="percent" />
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user