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