mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-28 16:06:41 +01:00
Merge branch 'rc' into workspaces
This commit is contained in:
@@ -5,17 +5,19 @@ import { useTheme } from "@mui/material";
|
||||
export default function Percentage({ value }: IBasicCellProps) {
|
||||
const theme = useTheme();
|
||||
|
||||
if (value === null || value === undefined) return null;
|
||||
|
||||
const percentage = typeof value === "number" ? value : 0;
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
textAlign: "right",
|
||||
color: theme.palette.text.primary,
|
||||
position: "relative",
|
||||
zIndex: 1,
|
||||
}}
|
||||
>
|
||||
{Math.round(percentage * 100)}%
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
textAlign: "right",
|
||||
color: theme.palette.text.primary,
|
||||
position: "relative",
|
||||
zIndex: 1,
|
||||
}}
|
||||
>
|
||||
{Math.round(percentage * 100)}%
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user