feat: Portal 1139/Table Component #108
Conversation
b1e3624 to
c3c7906
Compare
c3c7906 to
3001bd7
Compare
3001bd7 to
a74b22b
Compare
| <Table> | ||
| <TableHead> | ||
| <TableRow> | ||
| <TableHeader className="table-header-checkbox"> |
There was a problem hiding this comment.
Having class names that are aware of the content within seems weird to me. I think it would be better of the content itself worried about it's style.
| <Table> | ||
| <TableHead> | ||
| <TableRow> | ||
| <TableHeader className="width-05 flex-justify-center"> |
There was a problem hiding this comment.
What of these classes can we use as defaults for the table? I would like it if, by default, the user wouldn't have to include these classes, especially the width and padding ones.
| export interface TableHeaderProps { | ||
| children?: React.ReactNode | React.ReactNode[]; | ||
| className?: string; | ||
| size?: "sm" | "md" | "lg"; |
There was a problem hiding this comment.
Since we are using the same strings here for size in this component and the TableDataCell component, let's extract it out to a type and reuse it.
| <TableBody> | ||
| {data.map((info, index) => ( | ||
| <TableRow key={`table-row-${index}`}> | ||
| <TableDataCell size="sm" className="flex-justify-center"> |
There was a problem hiding this comment.
It looks like the size prop specified here needs to match the one set in the corresponding TableHeader. Is it possible to have the data cell follow the column cell width?
This is the new
Tablecomponent following these figma designs https://www.figma.com/file/zQc8XJMQpYxjcMzSPjY0nv/Diagram---DEX-Portal%3A-View-Upload-Status-Flow?type=whiteboard&node-id=1265-2662&t=4PiOzZpK2PEPBw4r-0