<script lang="ts">
  import { type FieldInfo } from "./field.svelte";

  type Props = {
    field: FieldInfo;
    index: number;
  };

  let { field, index }: Props = $props();
</script>

<div
  aria-colindex={index}
  class="lens-table__header"
  role="columnheader"
  style:width={`${field.field.width_px}px`}
>
  <div>{field.field.label ?? field.field.name}</div>
</div>
