Material UI – How do you make a horizontal List?

So far I have:

const flexContainer = {
  display: 'flex',
  flexDirection: 'row',
  padding: 0,
};

return (
  <List style={flexContainer}>
    <ListItem
      primaryText="foo1"
      secondaryText="bar1"/>
    <ListItem
      primaryText="foo2"
      secondaryText="bar2"/>
  </List>
);

This works. Looking for a potential better answer / opinions. Should this be built in?

Leave a Comment