From 1880c34ce066a8e33047690ef9fb90393100abd9 Mon Sep 17 00:00:00 2001
From: Steve Klebanoff <steve.klebanoff@gmail.com>
Date: Fri, 26 Oct 2018 13:46:14 -0700
Subject: feat(instant): Disable input when processing

---
 packages/instant/src/components/scaling_input.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'packages/instant/src/components/scaling_input.tsx')

diff --git a/packages/instant/src/components/scaling_input.tsx b/packages/instant/src/components/scaling_input.tsx
index 34cb0b5fd..593e55035 100644
--- a/packages/instant/src/components/scaling_input.tsx
+++ b/packages/instant/src/components/scaling_input.tsx
@@ -27,6 +27,7 @@ export interface ScalingInputProps {
     placeholder?: string;
     maxLength?: number;
     scalingSettings: ScalingSettings;
+    disabled: boolean;
 }
 
 export interface ScalingInputState {
@@ -49,6 +50,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu
         onFontSizeChange: util.boundNoop,
         maxLength: 7,
         scalingSettings: defaultScalingSettings,
+        disabled: false,
     };
     public state: ScalingInputState = {
         inputWidthPxAtPhaseChange: undefined,
@@ -121,7 +123,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu
         }
     }
     public render(): React.ReactNode {
-        const { fontColor, onChange, placeholder, value, maxLength } = this.props;
+        const { disabled, fontColor, onChange, placeholder, value, maxLength } = this.props;
         const phase = ScalingInput.getPhaseFromProps(this.props);
         return (
             <Input
@@ -133,6 +135,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu
                 fontSize={`${this._calculateFontSize(phase)}px`}
                 width={this._calculateWidth(phase)}
                 maxLength={maxLength}
+                disabled={disabled}
             />
         );
     }
-- 
cgit v1.2.3

