dify/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/tab/item.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

34 lines
656 B
TypeScript

import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
type ItemProps = {
isActive: boolean
label: string
onClick: () => void
}
const Item = ({
isActive,
label,
onClick,
}: ItemProps) => {
return (
<div
className={cn(
'relative flex h-full cursor-pointer items-center system-md-semibold text-text-tertiary',
isActive && 'text-text-primary',
)}
onClick={onClick}
>
{label}
{
isActive && (
<div className="absolute bottom-0 h-0.5 w-full bg-util-colors-blue-brand-blue-brand-600" />
)
}
</div>
)
}
export default React.memo(Item)