fix: Do not render div as a descendant of p (#494)

This commit is contained in:
Tatius Titus 2023-04-02 05:07:09 +03:30 committed by GitHub
parent af5e0d589e
commit 66f3f0ba07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ export const ProxyRender = (props: RenderProps) => {
<ListItemText
primary={group.name}
secondary={
<Box
<ListItemTextChild
sx={{
overflow: "hidden",
display: "flex",
@ -50,7 +50,7 @@ export const ProxyRender = (props: RenderProps) => {
>
<StyledTypeBox>{group.type}</StyledTypeBox>
<StyledSubtitle>{group.now}</StyledSubtitle>
</Box>
</ListItemTextChild>
}
secondaryTypographyProps={{
sx: { display: "flex", alignItems: "center" },
@ -142,7 +142,11 @@ const StyledSubtitle = styled("span")`
white-space: nowrap;
`;
const StyledTypeBox = styled(Box)(({ theme }) => ({
const ListItemTextChild = styled("span")`
display: block;
`;
const StyledTypeBox = styled(ListItemTextChild)(({ theme }) => ({
display: "inline-block",
border: "1px solid #ccc",
borderColor: alpha(theme.palette.primary.main, 0.5),