ErrorBoundary
1 year ago
Icons
9 months ago
Notifications
11 months ago
Tabs
9 months ago
store
1 year ago
AdminDetailsPage.module.scss
7 months ago
AdminSection.tsx
7 months ago
ConfirmationDialog.tsx
9 months ago
DefaultPrimaryActionButton.tsx
1 year ago
index.tsx
5 months ago
types.ts
9 months ago
DefaultPrimaryActionButton.tsx
26 lines
| 1 | /** |
| 2 | * External Dependencies |
| 3 | */ |
| 4 | import { __ } from '@wordpress/i18n'; |
| 5 | import {Spinner} from '@wordpress/components'; |
| 6 | |
| 7 | /** |
| 8 | * @since 4.4.0 |
| 9 | */ |
| 10 | export default function DefaultPrimaryActionButton({ isSaving, formState, className }: { isSaving: boolean, formState: any, className: string }) { |
| 11 | return ( |
| 12 | <button |
| 13 | type="submit" |
| 14 | disabled={!formState.isDirty} |
| 15 | className={className} |
| 16 | > |
| 17 | {isSaving ? ( |
| 18 | <> |
| 19 | {__('Saving changes', 'give')} |
| 20 | <Spinner /> |
| 21 | </> |
| 22 | ) : __('Save changes', 'give')} |
| 23 | </button> |
| 24 | ); |
| 25 | } |
| 26 |