swordev / suid

A port of Material-UI (MUI) built with SolidJS.
https://suid.io
MIT License
660 stars 47 forks source link

Problem with <ListItemText/> #243

Closed T3ch0o closed 11 months ago

T3ch0o commented 1 year ago

The secondary attribute doesn't apply any changes to the component.

<ListItemText primary={user.data?.username} secondary={<Typography>{user.data?.email}</Typography>} />

This should display the username and the email below, but only the username is displayed.

juanrgm commented 11 months ago

Could you share the source code?

This code works:

https://stackblitz.com/edit/zc2ij8?file=src%2FApp.tsx

import {
  Typography,
  List,
  ListItem,
  ListItemButton,
  ListItemText,
} from '@suid/material';

export default function BasicList() {
  return (
    <List>
      <ListItem>
        <ListItemButton>
          <ListItemText
            primary="user1"
            secondary={<Typography>user1@localhost</Typography>}
          />
        </ListItemButton>
      </ListItem>
    </List>
  );
}