index.tsx
19 lines
| 1 | import styles from './TableCell.module.scss'; |
| 2 | import cx from 'classnames'; |
| 3 | |
| 4 | export default function TableCell({className = '', children = null, heading = false}) { |
| 5 | if (heading) { |
| 6 | return ( |
| 7 | <th className={cx(styles.tableCell, styles.tableRowHeader, className)} scope="row"> |
| 8 | {children} |
| 9 | </th> |
| 10 | ); |
| 11 | } |
| 12 | |
| 13 | return <td className={cx(styles.tableCell, className)}>{children}</td>; |
| 14 | } |
| 15 | |
| 16 | export function IdBadge({id, addClass = ''}) { |
| 17 | return <div className={cx(styles.idBadge, addClass)}>{id}</div>; |
| 18 | } |
| 19 |