aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/scaling_amount_input.tsx
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-27 04:46:14 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-27 04:46:14 +0800
commit1880c34ce066a8e33047690ef9fb90393100abd9 (patch)
treec6facf128bb4af4eadd3b45023b0de209e7d847a /packages/instant/src/components/scaling_amount_input.tsx
parentaf91a56a5594d07d7da6caaeff79f5a7fb31ff98 (diff)
downloaddexon-sol-tools-1880c34ce066a8e33047690ef9fb90393100abd9.tar
dexon-sol-tools-1880c34ce066a8e33047690ef9fb90393100abd9.tar.gz
dexon-sol-tools-1880c34ce066a8e33047690ef9fb90393100abd9.tar.bz2
dexon-sol-tools-1880c34ce066a8e33047690ef9fb90393100abd9.tar.lz
dexon-sol-tools-1880c34ce066a8e33047690ef9fb90393100abd9.tar.xz
dexon-sol-tools-1880c34ce066a8e33047690ef9fb90393100abd9.tar.zst
dexon-sol-tools-1880c34ce066a8e33047690ef9fb90393100abd9.zip
feat(instant): Disable input when processing
Diffstat (limited to 'packages/instant/src/components/scaling_amount_input.tsx')
-rw-r--r--packages/instant/src/components/scaling_amount_input.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx
index 655ae2b74..8d51d27f9 100644
--- a/packages/instant/src/components/scaling_amount_input.tsx
+++ b/packages/instant/src/components/scaling_amount_input.tsx
@@ -8,6 +8,7 @@ import { util } from '../util/util';
import { ScalingInput } from './scaling_input';
export interface ScalingAmountInputProps {
+ disabled: boolean;
maxFontSizePx: number;
textLengthThreshold: number;
fontColor?: ColorOption;
@@ -20,6 +21,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps>
public static defaultProps = {
onChange: util.boundNoop,
onFontSizeChange: util.boundNoop,
+ disabled: false,
};
public render(): React.ReactNode {
const { textLengthThreshold, fontColor, maxFontSizePx, value, onFontSizeChange } = this.props;
@@ -33,6 +35,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps>
value={!_.isUndefined(value) ? value.toDisplayString() : ''}
placeholder="0.00"
emptyInputWidthCh={3.5}
+ disabled={this.props.disabled}
/>
);
}