import React from 'react';
import { Grid, type GridProps } from '@mui/material';

interface GridItemProps extends Omit<GridProps, 'item'> {
  component?: React.ElementType;
  xs?: number;
  sm?: number;
  md?: number;
  lg?: number;
  xl?: number;
}

export const GridItem: React.FC<GridItemProps> = ({ children, component = 'div', ...props }) => {
  return (
    <Grid {...props}>
      {React.createElement(component, {}, children)}
    </Grid>
  );
};