import { omit } from 'lodash' ; import { BasicType } from '@core/constants' ; import { RecursivePartial } from '@core/typings' ; import React from 'react' ; import { ITable } from '@core/blocks/Table' ; import MjmlBlock , { MjmlBlockProps } from '@core/components/MjmlBlock' ; export type TableProps = RecursivePartial < ITable [ 'data' ] > & RecursivePartial < ITable [ 'attributes' ] > & { children ? : MjmlBlockProps < ITable > [ 'children' ] ; } ; export function Table ( props ) { return ( < MjmlBlock attributes = { omit ( props , [ 'data' , 'children' ] ) } value = { props . value } type = { BasicType . TABLE } > { props . children } < /MjmlBlock>); }