mirror of
https://github.com/langgenius/dify.git
synced 2025-07-23 17:40:22 +00:00
29 lines
601 B
TypeScript
29 lines
601 B
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import React from 'react'
|
|
import cn from '@/utils/classnames'
|
|
|
|
type Props = {
|
|
label: string
|
|
description?: string
|
|
}
|
|
|
|
const Label: FC<Props> = ({
|
|
label,
|
|
description,
|
|
}) => {
|
|
return (
|
|
<div>
|
|
<div className={cn('flex h-6 items-center', description && 'h-4')}>
|
|
<span className='system-sm-semibold text-text-secondary'>{label}</span>
|
|
</div>
|
|
{description && (
|
|
<div className='body-xs-regular mt-1 text-text-tertiary'>
|
|
{description}
|
|
</div>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|
|
export default React.memo(Label)
|