import { SxProps, Theme, Typography, useTheme } from "@mui/material" interface Props { text1: string; text2?: string; sx?: SxProps; } export default function ComplexHeader({ text1, text2, sx }: Props) { const theme = useTheme() return ( {text1} {text2 && {text2} } ) }