import { styled } from '@mui/material/styles';
import { ImageFieldProps, ImageField as RaImageField } from 'react-admin';

const StyledImageField = styled(RaImageField, { slot: 'root' })(() => ({}));

function ImageField(props: ImageFieldProps): JSX.Element {
  const source = `_${props?.source}`;
  return <StyledImageField {...props} source={source} />;
}

export { ImageField };
export type { ImageFieldProps };
