MCPcopy
hub / github.com/primer/react / getPreviousStep

Function getPreviousStep

packages/react/src/DataTable/__tests__/Pagination.test.tsx:299–305  ·  view source on GitHub ↗
(element: HTMLElement)

Source from the content-addressed store, hash-verified

297}
298
299function 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
307function getNextStep(element: HTMLElement) {
308 const step = element.closest('li')

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected