dify/web/app/components/billing/trigger-events-limit-modal/index.tsx
Stephen Zhou 1873b22e96
refactor: update to tailwind v4 (#34415)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2026-04-02 07:06:11 +00:00

52 lines
1.3 KiB
TypeScript

'use client'
import type { FC } from 'react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import { TriggerAll } from '@/app/components/base/icons/src/vender/workflow'
import PlanUpgradeModal from '@/app/components/billing/plan-upgrade-modal'
import UsageInfo from '@/app/components/billing/usage-info'
type Props = {
show: boolean
onClose: () => void
onUpgrade: () => void
usage: number
total: number
resetInDays?: number
}
const TriggerEventsLimitModal: FC<Props> = ({
show,
onClose,
onUpgrade,
usage,
total,
resetInDays,
}) => {
const { t } = useTranslation()
return (
<PlanUpgradeModal
show={show}
onClose={onClose}
onUpgrade={onUpgrade}
Icon={TriggerAll as React.ComponentType<React.SVGProps<SVGSVGElement>>}
title={t('triggerLimitModal.title', { ns: 'billing' })}
description={t('triggerLimitModal.description', { ns: 'billing' })}
extraInfo={(
<UsageInfo
className="mt-4 w-full radius-xl bg-components-panel-on-panel-item-bg"
Icon={TriggerAll}
name={t('triggerLimitModal.usageTitle', { ns: 'billing' })}
usage={usage}
total={total}
resetInDays={resetInDays}
hideIcon
/>
)}
/>
)
}
export default React.memo(TriggerEventsLimitModal)