aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/scaling_amount_input.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-24 06:54:18 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-24 06:54:18 +0800
commita5edb0b421afaaa34290dc3ada73da6bca3c556a (patch)
treeecbe9ecbc7ef9fbcd339c5424f8d79a13e1c66cf /packages/instant/src/components/scaling_amount_input.tsx
parent053e147afc1b8471c480a8612cb6bae4c363b21b (diff)
downloaddexon-sol-tools-a5edb0b421afaaa34290dc3ada73da6bca3c556a.tar
dexon-sol-tools-a5edb0b421afaaa34290dc3ada73da6bca3c556a.tar.gz
dexon-sol-tools-a5edb0b421afaaa34290dc3ada73da6bca3c556a.tar.bz2
dexon-sol-tools-a5edb0b421afaaa34290dc3ada73da6bca3c556a.tar.lz
dexon-sol-tools-a5edb0b421afaaa34290dc3ada73da6bca3c556a.tar.xz
dexon-sol-tools-a5edb0b421afaaa34290dc3ada73da6bca3c556a.tar.zst
dexon-sol-tools-a5edb0b421afaaa34290dc3ada73da6bca3c556a.zip
polish: improve scaling significantly
Diffstat (limited to 'packages/instant/src/components/scaling_amount_input.tsx')
-rw-r--r--packages/instant/src/components/scaling_amount_input.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx
index 2baff5621..db3062b57 100644
--- a/packages/instant/src/components/scaling_amount_input.tsx
+++ b/packages/instant/src/components/scaling_amount_input.tsx
@@ -9,8 +9,7 @@ import { ScalingInput } from './scaling_input';
export interface ScalingAmountInputProps {
maxFontSizePx: number;
- startWidthCh: number;
- endWidthCh: number;
+ textLengthThreshold: number;
fontColor?: ColorOption;
value?: BigNumber;
onChange: (value?: BigNumber, fontSize?: number) => void;
@@ -23,11 +22,11 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps>
onFontSizeChange: util.boundNoop,
};
public render(): React.ReactNode {
- const { startWidthCh, endWidthCh, fontColor, maxFontSizePx, value, onFontSizeChange } = this.props;
+ const { textLengthThreshold, fontColor, maxFontSizePx, value, onFontSizeChange } = this.props;
return (
<ScalingInput
- endWidthCh={endWidthCh}
maxFontSizePx={maxFontSizePx}
+ textLengthThreshold={textLengthThreshold}
onFontSizeChange={onFontSizeChange}
fontColor={fontColor}
onChange={this._handleChange}