Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

802 B
Raw Blame
'use client'

import { cn } from '@langgenius/dify-ui/cn'
import PluginTypeSwitch from './plugin-type-switch'
import { MarketplacePluginSearch } from './search-input'

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,
      )}
    >
      <div className="mx-auto w-160 max-w-full shrink-0">
        <MarketplacePluginSearch />
      </div>
      <PluginTypeSwitch />
    </div>
  )
}

export default StickySearchAndSwitchWrapper