<script>
export default {
  name: 'GridTableBody',
  inject: ['table'],
  props: {
    data: {
      type: Array,
      default: null
    },
    itemRender: {
      type: Function,
      default: null
    },
    size: {
      type: String,
      default: ''
    }
  },
  render (h) {
    return h('div', {
      staticClass: `l-flex__auto l-grid ${this.size} c-table__main u-overflow-y--auto`
    }, this.itemRender && this.data?.map(this.itemRender))
  }
}
</script>
