Gallery.tsx 691 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import { RefsImgSubstance, Props } from './RefsImg';
  3. const gridDefault = 'col-4';
  4. const gridGapDefault = '1px';
  5. export const Gallery = React.memo((props: Props): JSX.Element => {
  6. const grid = props.grid || gridDefault;
  7. const gridGap = props.gridGap || gridGapDefault;
  8. return <RefsImgSubstance grid={grid} gridGap={gridGap} {...props} />;
  9. });
  10. export const GalleryImmutable = React.memo((props: Omit<Props, 'isImmutable'>): JSX.Element => {
  11. const grid = props.grid || gridDefault;
  12. const gridGap = props.gridGap || gridGapDefault;
  13. return <RefsImgSubstance grid={grid} gridGap={gridGap} {...props} isImmutable />;
  14. });
  15. Gallery.displayName = 'Gallery';