docs: update to next 15 + eslint 9 (#9839)
* update next * updated react * update eslint * finish updating eslint * fix content lint errors * fix docs test * fix vale action * fix installation errors
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
TokenInputProps,
|
||||
TokenOutputProps,
|
||||
} from "prism-react-renderer"
|
||||
import React, { useCallback, useMemo } from "react"
|
||||
import React, { useCallback, useMemo, useRef } from "react"
|
||||
import { CodeBlockCollapsibleLines } from "../../components/CodeBlock/Collapsible/Lines"
|
||||
import { useCollapsible } from "../use-collapsible"
|
||||
|
||||
@@ -22,7 +22,7 @@ export type CollapsibleCodeLines = {
|
||||
token: Token[][],
|
||||
highlightProps: HighlightProps,
|
||||
lineNumberOffset?: number
|
||||
) => React.ReactNode
|
||||
) => React.JSX.Element[]
|
||||
}
|
||||
|
||||
export type CollapsedCodeLinesPosition = "start" | "end"
|
||||
@@ -65,10 +65,12 @@ export const useCollapsibleCodeLines = ({
|
||||
return collapsedRange.start === 1 ? "start" : "end"
|
||||
}, [collapsedRange])
|
||||
|
||||
const ref = useRef(null)
|
||||
const collapsibleHookResult = useCollapsible({
|
||||
unmountOnExit: false,
|
||||
translateEnabled: false,
|
||||
heightAnimation: true,
|
||||
childrenRef: ref,
|
||||
})
|
||||
|
||||
const getCollapsedLinesElm = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user