mirror of
https://github.com/langgenius/dify.git
synced 2026-02-18 22:00:55 -05:00
Replace FC<Props> pattern with direct props typing in function parameters for better TypeScript inference and modern React best practices.
29 lines
513 B
TypeScript
29 lines
513 B
TypeScript
'use client'
|
|
|
|
import { memo } from 'react'
|
|
|
|
type SectionHeaderProps = {
|
|
title: string
|
|
description: string
|
|
className?: string
|
|
}
|
|
|
|
const SectionHeader = ({
|
|
title,
|
|
description,
|
|
className,
|
|
}: SectionHeaderProps) => {
|
|
return (
|
|
<header className={className}>
|
|
<h2 className="title-xl-semi-bold text-text-primary">
|
|
{title}
|
|
</h2>
|
|
<p className="system-xs-regular mt-0.5 text-text-tertiary">
|
|
{description}
|
|
</p>
|
|
</header>
|
|
)
|
|
}
|
|
|
|
export default memo(SectionHeader)
|