mirror of
https://github.com/langgenius/dify.git
synced 2025-09-26 17:46:00 +00:00
27 lines
458 B
TypeScript
27 lines
458 B
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import React from 'react'
|
|
import { format } from '@/service/base'
|
|
|
|
export type ITextGenerationProps = {
|
|
value: string
|
|
className?: string
|
|
}
|
|
|
|
const TextGeneration: FC<ITextGenerationProps> = ({
|
|
value,
|
|
className,
|
|
}) => {
|
|
return (
|
|
<div
|
|
className={className}
|
|
dangerouslySetInnerHTML={{
|
|
__html: format(value),
|
|
}}
|
|
>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default React.memo(TextGeneration)
|