(text, action, className = '')
| 46 | return node; |
| 47 | }; |
| 48 | const button = (text, action, className = '') => { |
| 49 | const node = el('button', className, text); |
| 50 | node.type = 'button'; |
| 51 | node.addEventListener('click', action); |
| 52 | return node; |
| 53 | }; |
| 54 | const title = text => String(text || '').replaceAll('_', ' ').replace(/^./, c => c.toUpperCase()); |
| 55 | const shown = value => value === null || value === undefined ? 'unavailable' : String(value); |
| 56 | const badge = (text, value = text) => el('span', 'badge ' + String(value).toLowerCase().replace(/[^a-z]/g, ''), text); |
no test coverage detected