mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-06 20:43:13 +08:00
Added CompactTable and ActionIcons UI components
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { ReactNode } from 'react';
|
||||
import classes from './CompactTable.module.css';
|
||||
|
||||
interface Props {
|
||||
headers: string[];
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const CompactTable = ({ headers, children }: Props): JSX.Element => {
|
||||
return (
|
||||
<div
|
||||
className={classes.CompactTable}
|
||||
style={{ gridTemplateColumns: `repeat(${headers.length}, 1fr)` }}
|
||||
>
|
||||
{headers.map((h, idx) => (
|
||||
<span key={idx}>{h}</span>
|
||||
))}
|
||||
|
||||
<div
|
||||
className={classes.Separator}
|
||||
style={{ gridColumn: `1 / ${headers.length + 1}` }}
|
||||
></div>
|
||||
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user