aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/scaling_amount_input.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/components/scaling_amount_input.tsx')
-rw-r--r--packages/instant/src/components/scaling_amount_input.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx
index a0b7b74af..83375af00 100644
--- a/packages/instant/src/components/scaling_amount_input.tsx
+++ b/packages/instant/src/components/scaling_amount_input.tsx
@@ -9,12 +9,13 @@ import { ScalingInput } from './scaling_input';
import { Container, Text } from './ui';
export interface ScalingAmountInputProps {
- fontSizePx: number;
+ maxFontSizePx: number;
startWidthCh: number;
endWidthCh: number;
fontColor?: ColorOption;
value?: BigNumber;
onChange: (value?: BigNumber, fontSize?: number) => void;
+ onFontSizeChange: (fontSizePx: number) => void;
}
export class ScalingAmountInput extends React.Component<ScalingAmountInputProps> {
@@ -23,12 +24,13 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps>
onFontSizeChange: util.boundNoop,
};
public render(): React.ReactNode {
- const { startWidthCh, endWidthCh, fontColor, fontSizePx, value } = this.props;
+ const { startWidthCh, endWidthCh, fontColor, maxFontSizePx, value, onFontSizeChange } = this.props;
return (
<ScalingInput
startWidthCh={startWidthCh}
endWidthCh={endWidthCh}
- fontSizePx={fontSizePx}
+ maxFontSizePx={maxFontSizePx}
+ onFontSizeChange={onFontSizeChange}
fontColor={fontColor}
onChange={this._handleChange}
value={!_.isUndefined(value) ? value.toString() : ''}