import { VerticallyCenteredFlex } from "@ente/shared/components/Container"; import { ButtonProps, Typography } from "@mui/material"; interface Iprops { mainText: string; subText?: string; subIcon?: React.ReactNode; color?: ButtonProps["color"]; } const getSubTextColor = (color: ButtonProps["color"]) => { switch (color) { case "critical": return "critical.main"; default: return "text.faint"; } }; export const CaptionedText = (props: Iprops) => { return ( {props.mainText} {"•"} {props.subText ? ( {props.subText} ) : ( {props.subIcon} )} ); };