@mui/material APIs
- Button
- IconButton
- Typography
- MenuItem
- Box
- Tooltip
- TextField
- CircularProgress
- FormControlLabel
- List
- Divider
- ListItem
- ListItemText
- Select
- Grid
- ThemeProvider
- FormControl
- Link
- useTheme
- InputLabel
- Paper
- Dialog
- DialogTitle
- Toolbar
- createTheme
- LinearProgress
- Container
- Checkbox
- ListItemIcon
- DialogContent
- Card
- CssBaseline
- Theme
- useMediaQuery
- Menu
- Alert
- Tab
- DialogActions
- AppBar
- Switch
- Drawer
- Chip
- InputAdornment
- Collapse
- Stack
- CardContent
- DialogContentText
- TableBody
- TableCell
- TableRow
- Skeleton
- Table
- Tabs
- Avatar
- Autocomplete
- FormGroup
- SelectChangeEvent
- Radio
- AlertTitle
- TableHead
- InputBase
- Input
- Snackbar
- TextFieldProps
- styled
- alpha
- TableContainer
- CardActions
- Badge
- CardHeader
- ListItemButton
- CardActionArea
- Modal
- AccordionDetails
- AccordionSummary
- ButtonProps
- StyledEngineProvider
- RadioGroup
- ListItemAvatar
- Fade
- CardMedia
- Accordion
- Slider
- FormLabel
- FormHelperText
- Popover
- Backdrop
- Popper
- ThemeOptions
- Zoom
- ToggleButton
- ToggleButtonGroup
- SxProps
- Fab
- TooltipProps
- IconButtonProps
- CircularProgressProps
- darken
- TextareaAutosize
- OutlinedInput
- Breadcrumbs
- Slide
- SwipeableDrawer
- ClickAwayListener
- SelectProps
- TypographyProps
- ButtonBase
- ListItemSecondaryAction
- SvgIcon
- Pagination
- tooltipClasses
- ButtonGroup
- Hidden
- debounce
- FilledInput
- lighten
- useScrollTrigger
- darkScrollbar
- PaletteMode
- SnackbarCloseReason
- MenuList
- SvgIconProps
- SnackbarProps
- AlertColor
- Icon
- TablePagination
- MenuItemProps
- Stepper
- Step
- StepLabel
- ownerWindow
- useForkRef
- AlertProps
- InputUnstyled
- Rating
- capitalize
- SpeedDial
- SpeedDialAction
- SpeedDialIcon
- BadgeProps
- createSvgIcon
- Grow
- linearProgressClasses
- PaletteColor
- BottomNavigation
- Palette
- responsiveFontSizes
- OutlinedInputProps
- TabProps
- NoSsr
- PaletteOptions
- ListSubheader
- ImageList
- StepConnector
- tableCellClasses
- TableSortLabel
Other Related APIs
@mui/material#TypographyProps TypeScript Examples
The following examples show how to use
@mui/material#TypographyProps.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ListConversation.tsx From airmessage-web with Apache License 2.0 | 5 votes |
export default function ListConversation(props: {conversation: Conversation, selected?: boolean, highlighted?: boolean, onSelected: () => void, flippedProps?: Record<string, unknown>}) {
//Getting the conversation title
const [title, setConversationTitle] = useState(ConversationUtils.getFallbackTitle(props.conversation));
useEffect(() => {
//Updating the conversation's name if it has one
if(props.conversation.name) {
setConversationTitle(props.conversation.name);
return;
}
//Building the conversation title
ConversationUtils.getMemberTitle(props.conversation.members).then((title) => setConversationTitle(title));
}, [props.conversation.name, props.conversation.members]);
const primaryStyle: TypographyProps = props.highlighted ? {
color: "primary",
sx: {
fontSize: "1rem",
fontWeight: "bold"
}
} : {
sx: {
fontSize: "1rem",
fontWeight: 500
}
};
const secondaryStyle: TypographyProps = props.highlighted ? {
color: "textPrimary",
sx: {
fontWeight: "bold"
}
} : {};
return (
<div className={styles.containerOuter} {...props.flippedProps}>
<ListItemButton
className={styles.containerInner}
key={props.conversation.localID}
onClick={props.onSelected}
selected={props.selected}
sx={{
"&&.Mui-selected, &&.Mui-selected:hover": {
backgroundColor: "action.selected"
},
"&&:hover": {
backgroundColor: "action.hover"
}
}}>
<ListItemAvatar>
<GroupAvatar members={props.conversation.members} />
</ListItemAvatar>
<ListItemText className={styles.textPreview} primary={title} primaryTypographyProps={primaryStyle} secondary={previewString(props.conversation.preview)} secondaryTypographyProps={secondaryStyle} />
<Typography className={styles.textTime} variant="body2" color="textSecondary">{getLastUpdateStatusTime(props.conversation.preview.date)}</Typography>
</ListItemButton>
</div>
);
}