({id, description, screenshot}: FeatureMeta)
| 40 | } |
| 41 | |
| 42 | function buildFeatureCheckbox({id, description, screenshot}: FeatureMeta): HTMLElement { |
| 43 | return ( |
| 44 | <div className="feature" data-text={`${id} ${description}`.toLowerCase()}> |
| 45 | <input type="checkbox" name={`feature:${id}`} id={id} className="feature-checkbox" /> |
| 46 | <div className="info"> |
| 47 | <label className="feature-name" htmlFor={id}>{id}</label>{' '} |
| 48 | <a href={getFeatureUrl(id)} className="feature-link"> |
| 49 | source |
| 50 | </a> |
| 51 | <input hidden type="checkbox" className="screenshot-toggle" /> |
| 52 | {screenshot && ( |
| 53 | <a href={screenshot} className="screenshot-link"> |
| 54 | screenshot |
| 55 | </a> |
| 56 | )} |
| 57 | <p className="description">{domify(description)}</p> |
| 58 | {screenshot && ( |
| 59 | <img hidden src={screenshot} loading="lazy" className="screenshot" /> |
| 60 | )} |
| 61 | </div> |
| 62 | </div> |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | function summaryHandler(event: DelegateEvent<MouseEvent>): void { |
| 67 | if (event.ctrlKey || event.metaKey || event.shiftKey) { |
no test coverage detected