mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
935e72d449
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
29 lines
550 B
TypeScript
29 lines
550 B
TypeScript
import { memo } from 'react'
|
|
import cn from '@/utils/classnames'
|
|
|
|
type BadgeProps = {
|
|
className?: string
|
|
text: string
|
|
uppercase?: boolean
|
|
}
|
|
|
|
const Badge = ({
|
|
className,
|
|
text,
|
|
uppercase = true,
|
|
}: BadgeProps) => {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'inline-flex items-center px-[5px] h-5 rounded-[5px] border border-divider-deep leading-3 text-text-tertiary',
|
|
uppercase ? 'system-2xs-medium-uppercase' : 'system-xs-medium',
|
|
className,
|
|
)}
|
|
>
|
|
{text}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default memo(Badge)
|