Styles styels styles

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-01 18:12:51 +00:00
parent e96069775c
commit c880e24fc0
22 changed files with 314 additions and 219 deletions

View File

@@ -35,11 +35,12 @@ interface TableCellProps {
children: ReactNode; // Cell content
isHeader?: boolean; // If true, renders as <th>, otherwise <td>
className?: string; // Optional className for styling
style?: React.CSSProperties; // Optional inline styles for width, fontSize, etc.
}
// Table Component
const Table: React.FC<TableProps> = ({ children, className }) => {
return <table className={`min-w-full w-full ${className}`}>{children}</table>;
return <table className={`min-w-full w-full ${className}`} style={{ tableLayout: 'auto' }}>{children}</table>;
};
// TableHeader Component
@@ -62,9 +63,10 @@ const TableCell: React.FC<TableCellProps> = ({
children,
isHeader = false,
className,
style,
}) => {
const CellTag = isHeader ? "th" : "td";
return <CellTag className={` ${className}`}>{children}</CellTag>;
return <CellTag className={` ${className}`} style={style}>{children}</CellTag>;
};
export { Table, TableHeader, TableBody, TableRow, TableCell };