front-hub/src/components/ComplexNavText.tsx

39 lines
1.0 KiB
TypeScript
Raw Normal View History

2022-12-04 12:41:10 +00:00
import { Typography, useTheme } from "@mui/material";
interface Props {
text1: string;
text2?: string;
}
export default function ComplexNavText({ text1, text2 }: Props) {
const theme = useTheme();
return (
<Typography
sx={{
fontWeight: 400,
fontSize: "12px",
lineHeight: "14px",
color: theme.palette.grey2.main,
}}
>
{text1}
{text2 &&
<Typography
component="span"
sx={{
fontWeight: 400,
fontSize: "12px",
lineHeight: "14px",
color: theme.palette.fadePurple.main,
textUnderlinePosition: "under",
textDecorationColor: theme.palette.brightPurple.main,
}}
>
{text2}
</Typography>
}
</Typography>
);
}