Table
NewΠ’Π°Π±Π»ΠΈΡΡ Π΄Π°Π½ΠΈΡ Π· striped/hoverable ΡΠ΅ΠΆΠΈΠΌΠ°ΠΌΠΈ ΡΠ° ΠΊΠ°ΡΡΠΎΠΌΠ½ΠΈΠΌ ΡΠ΅Π½Π΄Π΅ΡΠΈΠ½Π³ΠΎΠΌ.
Import
import { Table } from '@brutal-ui/react';Basic Usage
| Name | Role | Status | |
|---|---|---|---|
| John Doe | john@example.com | Admin | Active |
| Jane Smith | jane@example.com | User | Active |
| Bob Johnson | bob@example.com | User | Inactive |
const columns = [
{ header: 'Name', key: 'name' },
{ header: 'Email', key: 'email' },
{ header: 'Role', key: 'role' },
];
const data = [
{ name: 'John Doe', email: 'john@example.com', role: 'Admin' },
{ name: 'Jane Smith', email: 'jane@example.com', role: 'User' },
];
<Table columns={columns} data={data} />Striped & Hoverable
| Name | Role | Status | |
|---|---|---|---|
| John Doe | john@example.com | Admin | Active |
| Jane Smith | jane@example.com | User | Active |
| Bob Johnson | bob@example.com | User | Inactive |
<Table columns={columns} data={data} striped hoverable />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| columns | Column[] | - | Column definitions |
| data | T[] | - | Table data |
| striped | boolean | false | Striped rows |
| hoverable | boolean | false | Hover effect |