dify/web/app/components/app/text-generate/saved-items/no-data/index.tsx
Stephen Zhou 36e840cd87
chore: knip fix (#34481)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-02 15:03:42 +00:00

44 lines
1.3 KiB
TypeScript

'use client'
import type { FC } from 'react'
import {
RiAddLine,
RiBookmark3Line,
} from '@remixicon/react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import Button from '@/app/components/base/button'
type INoDataProps = {
onStartCreateContent: () => void
}
const NoData: FC<INoDataProps> = ({
onStartCreateContent,
}) => {
const { t } = useTranslation()
return (
<div className="rounded-xl bg-background-section-burn p-6 ">
<div className="flex h-10 w-10 items-center justify-center radius-lg border-[0.5px] border-components-card-border bg-components-card-bg-alt shadow-lg backdrop-blur-xs">
<RiBookmark3Line className="h-4 w-4 text-text-accent" />
</div>
<div className="mt-3">
<span className="system-xl-semibold text-text-secondary">{t('generation.savedNoData.title', { ns: 'share' })}</span>
</div>
<div className="system-sm-regular mt-1 text-text-tertiary">
{t('generation.savedNoData.description', { ns: 'share' })}
</div>
<Button
variant="primary"
className="mt-3"
onClick={onStartCreateContent}
>
<RiAddLine className="mr-1 h-4 w-4" />
<span>{t('generation.savedNoData.startCreateContent', { ns: 'share' })}</span>
</Button>
</div>
)
}
export default React.memo(NoData)