go-guess/frontend/src/components/form/FormActions.tsx

25 lines
513 B
TypeScript
Raw Normal View History

import { Link } from 'react-router-dom'
import { ArrowRight } from 'lucide-react'
export function FormActions({
saving,
cancelTo,
label,
}: {
saving: boolean
cancelTo: string
label: string
}) {
return (
<div className="form-actions">
<Link className="button ghost" to={cancelTo}>
Cancel
</Link>
<button className="button primary" type="submit" disabled={saving}>
{saving ? 'Saving…' : label}
<ArrowRight size={17} />
</button>
</div>
)
}