Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
699 B

import Typography from '@mui/material/Typography';
import { makeStyles } from '@material-ui/core/styles';
import { TEXT, UNSELECTED } from '../../lib/consts/DEFAULT_THEME';
interface TextProps {
text: string;
selected?: boolean;
}
const useStyles = makeStyles(() => ({
selected: {
color: TEXT,
},
unselected: {
color: UNSELECTED,
},
}));
const BodyText = ({ text, selected }: TextProps): JSX.Element => {
const classes = useStyles();
return (
<Typography
variant="subtitle1"
className={selected ? classes.selected : classes.unselected}
>
{text}
</Typography>
);
};
BodyText.defaultProps = {
selected: true,
};
export default BodyText;