From c8a83ce1faa10f7cff9d6bac71c6913279b605f6 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Wed, 7 Oct 2020 13:20:09 +0300 Subject: [PATCH] Adding showButtons prop to InfoPanel Signed-off-by: Alex Andreev --- src/renderer/components/dock/info-panel.tsx | 44 +++++++++++---------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/renderer/components/dock/info-panel.tsx b/src/renderer/components/dock/info-panel.tsx index 01dc7d3c2a..777aa01027 100644 --- a/src/renderer/components/dock/info-panel.tsx +++ b/src/renderer/components/dock/info-panel.tsx @@ -23,7 +23,7 @@ interface OptionalProps { submitLabel?: ReactNode; submittingMessage?: ReactNode; disableSubmit?: boolean; - showSubmit?: boolean; + showButtons?: boolean showSubmitClose?: boolean; showInlineInfo?: boolean; showNotifications?: boolean; @@ -34,7 +34,7 @@ export class InfoPanel extends Component { static defaultProps: OptionalProps = { submitLabel: Submit, submittingMessage: Submitting.., - showSubmit: true, + showButtons: true, showSubmitClose: true, showInlineInfo: true, showNotifications: true, @@ -89,7 +89,7 @@ export class InfoPanel extends Component { } render() { - const { className, controls, submitLabel, disableSubmit, error, submittingMessage, showSubmit, showSubmitClose } = this.props; + const { className, controls, submitLabel, disableSubmit, error, submittingMessage, showButtons, showSubmitClose } = this.props; const { submit, close, submitAndClose, waiting } = this; const isDisabled = !!(disableSubmit || waiting || error); return ( @@ -100,24 +100,26 @@ export class InfoPanel extends Component {
{waiting ? <> {submittingMessage} : this.renderErrorIcon()}
-