# gds-table - React

## Import

```typescript
import { GdsTable } from '@sebgroup/green-core/react'
```

## Usage

Use the component as a React JSX element:

```tsx
<GdsTable>
  {/* content */}
</GdsTable>
```

## Event Handling

Events are handled using React event handler props. Event names are converted from kebab-case to camelCase with an "on" prefix:

| Web Component Event | React Handler Prop | Handler Example |
|---------------------|--------------------|-----------------|
| `gds-page-change` | `onGdsPageChange` | `onGdsPageChange={handler}` |
| `gds-rows-change` | `onGdsRowsChange` | `onGdsRowsChange={handler}` |
| `gds-sort-change` | `onGdsSortChange` | `onGdsSortChange={handler}` |
| `gds-table-data-loaded` | `onGdsTableDataLoaded` | `onGdsTableDataLoaded={handler}` |
| `gds-table-data-error` | `onGdsTableDataError` | `onGdsTableDataError={handler}` |
| `gds-table-selection` | `onGdsTableSelection` | `onGdsTableSelection={handler}` |
