mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Realtime header component.
This commit is contained in:
parent
69b317386a
commit
e30f2dfb44
34 changed files with 167 additions and 177 deletions
|
|
@ -10,6 +10,7 @@ export default function Table({
|
|||
className,
|
||||
bodyClassName,
|
||||
rowKey,
|
||||
showHeader = true,
|
||||
children,
|
||||
}) {
|
||||
if (empty && rows.length === 0) {
|
||||
|
|
@ -18,17 +19,19 @@ export default function Table({
|
|||
|
||||
return (
|
||||
<div className={classNames(styles.table, className)}>
|
||||
<div className={classNames(styles.header, 'row')}>
|
||||
{columns.map(({ key, label, className, style, header }) => (
|
||||
<div
|
||||
key={key}
|
||||
className={classNames(styles.head, className, header?.className)}
|
||||
style={{ ...style, ...header?.style }}
|
||||
>
|
||||
{label}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
{showHeader && (
|
||||
<div className={classNames(styles.header, 'row')}>
|
||||
{columns.map(({ key, label, className, style, header }) => (
|
||||
<div
|
||||
key={key}
|
||||
className={classNames(styles.head, className, header?.className)}
|
||||
style={{ ...style, ...header?.style }}
|
||||
>
|
||||
{label}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<div className={classNames(styles.body, bodyClassName)}>
|
||||
{rows.length === 0 && <NoData />}
|
||||
{!children &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue