mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-25 15:47:49 +08:00

Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
24 lines
542 B
TypeScript
24 lines
542 B
TypeScript
import type { ComponentProps, FC } from 'react'
|
|
import classNames from '@/utils/classnames'
|
|
|
|
export type PreviewHeaderProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
title: string
|
|
}
|
|
|
|
export const PreviewHeader: FC<PreviewHeaderProps> = (props) => {
|
|
const { title, className, children, ...rest } = props
|
|
return <div
|
|
{...rest}
|
|
className={classNames(
|
|
className,
|
|
)}
|
|
>
|
|
<div
|
|
className='text-text-accent system-2xs-semibold-uppercase uppercase px-1 mb-1'
|
|
>
|
|
{title}
|
|
</div>
|
|
{children}
|
|
</div>
|
|
}
|