Styles styels styles
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user