Create a Grid Component in React — 12-Column Flexbox Layout System with Responsive Breakpoint Support
Build a responsive 12-column grid layout system similar to Material UI's Grid, with a <Grid> container and <GridItem> children. GridItem accepts a size prop (1–12 columns) for default width and an sm prop for small-screen override (max-width 600px). The Grid container accepts a spacing prop that sets the gap between items (multiplied by 8px). Calculate each item's width using CSS calc() and CSS custom properties: calc(((100% / 12) * size) - spacing). Add media query classes for the sm breakpoint. This was asked in Microsoft's frontend SDE2 interview.