prep for pigment

This commit is contained in:
Manav Rathi
2025-01-15 15:11:20 +05:30
parent 131cf43f73
commit 51597ed48d

View File

@@ -148,17 +148,25 @@ const CaptionedText: React.FC<CaptionedTextProps> = ({
mainText,
caption,
color,
}) => {
const subTextColor = color == "critical" ? "critical.main" : "text.faint";
return (
<Stack direction="row" sx={{ gap: "4px", alignItems: "center" }}>
<Typography>{mainText}</Typography>
<Typography variant="small" sx={{ color: subTextColor }}>
{"•"}
</Typography>
<Typography variant="small" sx={{ color: subTextColor }}>
{caption}
</Typography>
</Stack>
);
};
}) => (
<Stack direction="row" sx={{ gap: "4px", alignItems: "center" }}>
<Typography>{mainText}</Typography>
<CaptionTypography color={color}>{"•"}</CaptionTypography>
<CaptionTypography color={color}>{caption}</CaptionTypography>
</Stack>
);
const CaptionTypography: React.FC<
React.PropsWithChildren<{ color: EnteMenuItemProps["color"] }>
> = ({ color, children }) => (
<Typography
variant="small"
sx={[
color == "critical"
? { color: "critical.main" }
: { color: "text.faint" },
]}
>
{children}
</Typography>
);