From 921492e8186697e477c27d76bd7eb58ce2454765 Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 22 Oct 2018 16:45:48 -0700 Subject: feature: reduce font size by a percentage instead of a constant --- packages/instant/src/components/scaling_amount_input.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/instant/src/components/scaling_amount_input.tsx') 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 { @@ -23,12 +24,13 @@ export class ScalingAmountInput extends React.Component 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 (