front-hub/src/components/ComplexNavText.tsx
2022-12-04 15:41:10 +03:00

39 lines
1.0 KiB
TypeScript

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>
);
}