mirror of
https://github.com/langgenius/dify.git
synced 2026-08-01 18:30:48 +08:00
23 lines
594 B
TypeScript
23 lines
594 B
TypeScript
import type { HTMLAttributes, ReactNode } from 'react'
|
|
import { cn } from '@langgenius/dify-ui/cn'
|
|
import * as React from 'react'
|
|
|
|
type OptionListProps = {
|
|
children: ReactNode
|
|
} & HTMLAttributes<HTMLUListElement>
|
|
|
|
const optionListClassName = cn(
|
|
'flex h-[208px] flex-col gap-y-0.5 overflow-y-auto pb-[184px]',
|
|
'scrollbar-none [&::-webkit-scrollbar]:hidden',
|
|
)
|
|
|
|
const OptionList = ({ children, className, ...props }: OptionListProps) => {
|
|
return (
|
|
<ul className={cn(optionListClassName, className)} {...props}>
|
|
{children}
|
|
</ul>
|
|
)
|
|
}
|
|
|
|
export default React.memo(OptionList)
|