I am trying to make a horizontal scrollable list in React with Styled Components. Each list item is a fairly complex React component.
I have tried this question, this question, and this question too but none of them have worked. Each time, I either get a vertical list or a 2x2 grid.
const List = styled.ul`
list-style: none;
overflow-x: auto;
`;
const ListItem = styled.li`
display: inline-block;
`;
export default class PanelList extends Component {
render() {
const listItems = this.props.matchups.map(m => (
<ListItem>{<MatchupPanel matchups={m} />}</ListItem>
));
return <List>{listItems}</List>;
}
}
here) ?
– Nithin Thampi Sep 22 '19 at 10:54