/** * WordPress dependencies */ import { Button, Tooltip } from '@safe-wordpress/components'; import { _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import clsx from 'clsx'; /** * Internal dependencies */ import './style.scss'; export type SaveButtonProps = { readonly className?: string; readonly disabled?: boolean; readonly error?: string; readonly variant?: 'primary' | 'secondary'; readonly isSaving?: boolean; readonly isUpdate?: boolean; readonly onClick?: () => void; readonly baseLabel?: string; readonly loadingLabel?: string; }; const InternalSaveButton = ( { baseLabel, loadingLabel, className = '', disabled = false, error = '', variant = 'secondary', isSaving = false, isUpdate = false, onClick = () => void null, }: SaveButtonProps ): JSX.Element => ( ); const InternalSaveButtonWithRationale = ( { className, error, ...props }: SaveButtonProps ): JSX.Element => !! error ? ( ) : ( ); export const SaveButton = InternalSaveButtonWithRationale;