@etsoo/materialui
Version:
TypeScript Material-UI Implementation
11 lines (10 loc) • 747 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Box from "@mui/material/Box";
import LinearProgress from "@mui/material/LinearProgress";
import Typography from "@mui/material/Typography";
export function PercentLinearProgress(props) {
// Destruct
const { textProps, valueUnit = "%", ...rest } = props;
// Component
return (_jsxs(Box, { sx: { display: "flex", alignItems: "center", flexGrow: 2 }, children: [_jsx(Box, { sx: { width: "100%", mr: 1 }, children: _jsx(LinearProgress, { variant: "determinate", ...rest }) }), _jsx(Box, { sx: { minWidth: 35 }, children: _jsx(Typography, { variant: "caption", color: "text.secondary", ...textProps, children: `${Math.round(props.value)}${valueUnit}` }) })] }));
}