36 lines
891 B
TypeScript
36 lines
891 B
TypeScript
import { Button } from './ui'
|
|
import { t } from '@/lib/i18n'
|
|
|
|
interface ArticleFormButtonsProps {
|
|
loading: boolean
|
|
relayStatuses?: unknown // Kept for backward compatibility but not displayed
|
|
onCancel?: () => void
|
|
}
|
|
|
|
export function ArticleFormButtons({ loading, onCancel }: ArticleFormButtonsProps): React.ReactElement {
|
|
return (
|
|
<div className="space-y-3 pt-4">
|
|
<div className="flex gap-3">
|
|
<Button
|
|
type="submit"
|
|
variant="primary"
|
|
disabled={loading}
|
|
loading={loading}
|
|
className="flex-1"
|
|
>
|
|
{loading ? t('publish.publishing') : t('publish.button')}
|
|
</Button>
|
|
{onCancel && (
|
|
<Button
|
|
type="button"
|
|
variant="ghost"
|
|
onClick={onCancel}
|
|
>
|
|
{t('common.back')}
|
|
</Button>
|
|
)}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|