Allow to set className of a Smartable.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
Madeorsk 2024-09-25 19:13:24 +02:00
parent 6b96a85554
commit 04d28f880f
Signed by: Madeorsk
GPG key ID: 677E51CA765BB79F
3 changed files with 8 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{
"version": "1.1.0",
"version": "1.1.1",
"name": "@kernelui/smartable",
"description": "Kernel UI Smartable.",
"scripts": {

View file

@ -66,10 +66,10 @@ export function PaginatedInstance<CK extends ColumnKey>(props: InstancePropertie
/**
* Base component for a Smartable table.
*/
export function Table<CK extends ColumnKey>({columns, children}: React.PropsWithChildren<InstanceProperties<CK>>)
export function Table<CK extends ColumnKey>({className, columns, children}: React.PropsWithChildren<InstanceProperties<CK>>)
{
return (
<table className={"smartable"}>
<table className={classes("smartable", className)}>
<thead>
<ColumnsHeadings columns={columns} />
</thead>

View file

@ -15,6 +15,11 @@ export type SmartableData<CK extends ColumnKey> = Promisable<(Promisable<RowDefi
*/
export interface SmartableProperties<CK extends ColumnKey>
{
/**
* Table custom class name.
*/
className?: string;
/**
* Table data.
*/