(icon: string)
| 59 | const iconRegex = /^[a-z0-9- ]+$/; |
| 60 | |
| 61 | export function isIconValid(icon: string): boolean { |
| 62 | if (isBlank(icon)) { |
| 63 | return false; |
| 64 | } |
| 65 | return icon.match(iconRegex) != null; |
| 66 | } |
| 67 | |
| 68 | export function getSortIcon(sortType: string | boolean): React.ReactNode { |
| 69 | switch (sortType) { |
no test coverage detected