You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/app/components/plugins/marketplace/intersection-line/index.tsx

28 lines
567 B
TypeScript

'use client'
import { useRef } from 'react'
import { useScrollIntersection } from './hooks'
type IntersectionLineProps = {
containerRef: React.RefObject<HTMLDivElement>
intersectedCallback: (isIntersecting: boolean) => void
}
const IntersectionLine = ({
containerRef,
intersectedCallback,
}: IntersectionLineProps) => {
const ref = useRef<HTMLDivElement>(null)
useScrollIntersection(
containerRef,
ref,
intersectedCallback,
)
return (
<div ref={ref} className='h-[1px] bg-transparent'></div>
)
}
export default IntersectionLine