dify/web/app/components/plugins/marketplace/sticky-search-and-switch-wrapper.tsx
yyh af7d5e60b4
feat(ui): scaffold @langgenius/dify-ui and migrate design tokens (#35256)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-15 13:11:20 +00:00

31 lines
728 B
TypeScript

'use client'
import { cn } from '@langgenius/dify-ui/cn'
import PluginTypeSwitch from './plugin-type-switch'
import SearchBoxWrapper from './search-box/search-box-wrapper'
type StickySearchAndSwitchWrapperProps = {
pluginTypeSwitchClassName?: string
}
const StickySearchAndSwitchWrapper = ({
pluginTypeSwitchClassName,
}: StickySearchAndSwitchWrapperProps) => {
const hasCustomTopClass = pluginTypeSwitchClassName?.includes('top-')
return (
<div
className={cn(
'mt-4 bg-background-body',
hasCustomTopClass && 'sticky z-10',
pluginTypeSwitchClassName,
)}
>
<SearchBoxWrapper />
<PluginTypeSwitch />
</div>
)
}
export default StickySearchAndSwitchWrapper