Allow to set className of a Smartable.
This commit is contained in:
parent
6b96a85554
commit
04d28f880f
3 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"name": "@kernelui/smartable",
|
"name": "@kernelui/smartable",
|
||||||
"description": "Kernel UI Smartable.",
|
"description": "Kernel UI Smartable.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -66,10 +66,10 @@ export function PaginatedInstance<CK extends ColumnKey>(props: InstancePropertie
|
||||||
/**
|
/**
|
||||||
* Base component for a Smartable table.
|
* 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 (
|
return (
|
||||||
<table className={"smartable"}>
|
<table className={classes("smartable", className)}>
|
||||||
<thead>
|
<thead>
|
||||||
<ColumnsHeadings columns={columns} />
|
<ColumnsHeadings columns={columns} />
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -15,6 +15,11 @@ export type SmartableData<CK extends ColumnKey> = Promisable<(Promisable<RowDefi
|
||||||
*/
|
*/
|
||||||
export interface SmartableProperties<CK extends ColumnKey>
|
export interface SmartableProperties<CK extends ColumnKey>
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Table custom class name.
|
||||||
|
*/
|
||||||
|
className?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Table data.
|
* Table data.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue