hooks
4 years ago
images
4 years ago
BulkActionCheckbox.tsx
4 years ago
BulkActionSelect.module.scss
4 years ago
BulkActionSelect.tsx
4 years ago
Filters.tsx
4 years ago
FormSelect.module.scss
4 years ago
FormSelect.tsx
4 years ago
Input.module.scss
4 years ago
Input.tsx
4 years ago
ListTable.module.scss
4 years ago
ListTable.tsx
4 years ago
ListTablePage.module.scss
3 years ago
ListTableRows.module.scss
3 years ago
ListTableRows.tsx
4 years ago
Pagination.module.scss
4 years ago
Pagination.tsx
4 years ago
README.MD
4 years ago
RowAction.module.scss
4 years ago
RowAction.tsx
4 years ago
Select.module.scss
4 years ago
Select.tsx
4 years ago
TableCell.module.scss
4 years ago
TableCell.tsx
4 years ago
TestLabel.module.scss
4 years ago
TestLabel.tsx
4 years ago
TypeBadge.module.scss
4 years ago
TypeBadge.tsx
4 years ago
api.ts
4 years ago
index.tsx
4 years ago
TableCell.tsx
34 lines
| 1 | import styles from './TableCell.module.scss'; |
| 2 | import cx from 'classnames'; |
| 3 | import {__} from "@wordpress/i18n"; |
| 4 | |
| 5 | export default function TableCell({className = '', children = null, heading = false}) { |
| 6 | if(heading){ |
| 7 | return ( |
| 8 | <th className={cx(styles.tableCell, styles.tableRowHeader, className)} scope="row"> |
| 9 | {children} |
| 10 | </th> |
| 11 | ); |
| 12 | } |
| 13 | |
| 14 | return ( |
| 15 | <td className={cx(styles.tableCell, className)}> |
| 16 | {children} |
| 17 | </td> |
| 18 | ); |
| 19 | } |
| 20 | |
| 21 | export function IdBadge({ id, addClass = '' }){ |
| 22 | return ( |
| 23 | <div className={cx(styles.idBadge, addClass)}>{id}</div> |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | export function StatusBadge({ className, text}){ |
| 28 | return ( |
| 29 | <div className={cx(styles.statusBadge, className)}> |
| 30 | <p>{text || __('none', 'give')}</p> |
| 31 | </div> |
| 32 | ); |
| 33 | } |
| 34 |