From 79de78c78d2af187816bc3025a527cd171cb2486 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Sun, 10 Sep 2017 15:27:32 -0600 Subject: [PATCH] DurationInput refactoring --- app/components/DurationInput.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/DurationInput.tsx b/app/components/DurationInput.tsx index 296c339..45c514c 100644 --- a/app/components/DurationInput.tsx +++ b/app/components/DurationInput.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Input, InputOnChangeData } from "semantic-ui-react"; +import { Input, InputProps } from "semantic-ui-react"; import { Duration } from "@common/sprinklers"; @@ -36,7 +36,7 @@ export default class DurationInput extends React.Component<{ ); } - private onMinutesChange = (e: React.SyntheticEvent, { value }: InputOnChangeData) => { + private onMinutesChange: InputProps["onChange"] = (e, { value }) => { if (value.length === 0 || isNaN(Number(value))) { return; } @@ -44,7 +44,7 @@ export default class DurationInput extends React.Component<{ this.props.onDurationChange(this.props.duration.withMinutes(newMinutes)); } - private onSecondsChange = (e: React.SyntheticEvent, { value }: InputOnChangeData) => { + private onSecondsChange: InputProps["onChange"] = (e, { value }) => { if (value.length === 0 || isNaN(Number(value))) { return; }