mirror of
https://github.com/langgenius/dify.git
synced 2026-03-29 08:29:47 +08:00
38 lines
631 B
TypeScript
38 lines
631 B
TypeScript
import { useStore } from '../store'
|
|
import type { HelpLinePosition } from './types'
|
|
|
|
const HelpLineBase = ({
|
|
top,
|
|
right,
|
|
bottom,
|
|
left,
|
|
}: HelpLinePosition) => {
|
|
return (
|
|
<div
|
|
className='absolute w-[1px] bg-primary-300 z-[9]'
|
|
style={{ top, right, bottom, left }}
|
|
/>
|
|
)
|
|
}
|
|
|
|
const HelpLine = () => {
|
|
const helpLine = useStore(state => state.helpLine)
|
|
|
|
return (
|
|
<>
|
|
{
|
|
helpLine?.bottom && (
|
|
<HelpLineBase {...helpLine} />
|
|
)
|
|
}
|
|
{
|
|
helpLine?.right && (
|
|
<HelpLineBase {...helpLine} />
|
|
)
|
|
}
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default HelpLine
|