From 31ef730c8c77f7080428471f584712520b622dff Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 Apr 2024 14:58:19 +1000 Subject: [PATCH] fix: correct type for style prop on SessionInput --- ts/components/icon/SessionIconButton.tsx | 4 +--- ts/components/inputs/SessionInput.tsx | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ts/components/icon/SessionIconButton.tsx b/ts/components/icon/SessionIconButton.tsx index 98e0bc8c1..65a082096 100644 --- a/ts/components/icon/SessionIconButton.tsx +++ b/ts/components/icon/SessionIconButton.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import _ from 'lodash'; import { KeyboardEvent, MouseEvent, ReactNode, forwardRef, memo } from 'react'; -import styled, { CSSProperties } from 'styled-components'; +import styled from 'styled-components'; import { SessionIcon, SessionIconProps } from './SessionIcon'; interface SProps extends SessionIconProps { @@ -10,11 +10,9 @@ interface SProps extends SessionIconProps { isHidden?: boolean; margin?: string; padding?: string; - dataTestId?: string; dataTestIdIcon?: string; id?: string; title?: string; - style?: CSSProperties; tabIndex?: number; children?: ReactNode; } diff --git a/ts/components/inputs/SessionInput.tsx b/ts/components/inputs/SessionInput.tsx index 2c3805ea7..b3567bc80 100644 --- a/ts/components/inputs/SessionInput.tsx +++ b/ts/components/inputs/SessionInput.tsx @@ -2,7 +2,7 @@ import { ChangeEvent, ReactNode, useEffect, useState } from 'react'; import { motion } from 'framer-motion'; import { isEmpty, isEqual } from 'lodash'; -import styled from 'styled-components'; +import styled, { CSSProperties } from 'styled-components'; import { THEME_GLOBALS } from '../../themes/globals'; import { Noop } from '../../types/Util'; import { useHTMLDirection } from '../../util/i18n'; @@ -120,7 +120,7 @@ const ErrorItem = (props: { id: string; error: string }) => { const ShowHideButton = (props: { forceShow: boolean; toggleForceShow: Noop; error: boolean }) => { const htmlDirection = useHTMLDirection(); - const style = { + const style: CSSProperties = { position: 'absolute', top: '50%', transform: 'translateY(-50%)',