(element: HTMLElement)
| 297 | } |
| 298 | |
| 299 | function getPreviousStep(element: HTMLElement) { |
| 300 | const step = element.closest('li') |
| 301 | if (step) { |
| 302 | return step.previousElementSibling |
| 303 | } |
| 304 | throw new Error(`Unable to find previous step`) |
| 305 | } |
| 306 | |
| 307 | function getNextStep(element: HTMLElement) { |
| 308 | const step = element.closest('li') |