I want this icon to show up in the middle of the Material UI chip, nice and centered. Right now there's a weird whitespace next to it:
<Chip
avatar={<LinkAvatarImage socialTypeId={link.socialTypeId} />}
size="small"
variant="outlined"
/>
export function LinkAvatarImage({ socialTypeId } : { socialTypeId: number }) {
if (socialTypeId === socialTypes.PERSONAL_WEBSITE) {
return <WebIcon />;
}
...
I don't know how to tweak Material UI's Chip to do so.
I tried this but no luck:
export const useStyles = makeStyles((theme: Theme) =>
createStyles({
chip: {
alignItems: 'center',
justifyContent: 'center',
}
}),
);
const classes = useStyles();
<Chip
avatar={<LinkAvatarImage socialTypeId={link.socialTypeId} />}
size="small"
classes={classes.chip}
variant="outlined"
/>
but I also don't see a way to inject a custom style via the props on Chip. There doesn't seem to be a property to let me do that in the first place. I think there's a classes prop but I don't understand how to set that in this case.
