mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-14 10:09:09 +03:00
33 lines
580 B
TypeScript
33 lines
580 B
TypeScript
import React, { CSSProperties } from "react";
|
|
import { integer } from "tachi-common";
|
|
|
|
export default function CustomProgressBar({
|
|
animated,
|
|
striped,
|
|
style,
|
|
max = 100,
|
|
now = 0,
|
|
}: {
|
|
animated?: boolean;
|
|
striped?: boolean;
|
|
style?: CSSProperties;
|
|
max?: integer;
|
|
now?: integer;
|
|
}) {
|
|
return (
|
|
<div className="progress">
|
|
<div
|
|
className={`progress-bar${animated ? " progress-bar-animated" : ""}${
|
|
striped ? " progress-bar-striped" : ""
|
|
}`}
|
|
style={Object.assign(
|
|
{
|
|
width: `${(now / max) * 100}%`,
|
|
},
|
|
style
|
|
)}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|