You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/tab/item.tsx

34 lines
643 B
TypeScript

import React from 'react'
import cn from '@/utils/classnames'
type ItemProps = {
isActive: boolean
label: string
onClick: () => void
}
const Item = ({
isActive,
label,
onClick,
}: ItemProps) => {
return (
<div
className={cn(
'system-md-semibold relative flex h-full cursor-pointer items-center 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)