I want to have Divider between Grid item.
The output should be like this:-
Col 1 | Col 2 | Col 3
Though in my code I'm unable to see the Divider and also the items are aligned in vertical fashion.
import "./styles.css";
import { Grid, Divider } from "@material-ui/core";
export default function App() {
const tempArray = ['Col 1', 'Col 2', 'Col 3'];
return(
<Grid container align='center' direction='column'>
{tempArray.map((title)=>{
return(
<Grid container direction='row'>
<Grid item xs>
<strong>{title}</strong>
</Grid>
<Divider orientation='vertical' flexItem></Divider>
</Grid>
);
}
)}
</Grid>
);
}
Also, I'm not sure how I can skip the Divider for the last item.
Here's the code sandbox link.