diff --git a/ts/components/session/icon/SessionIcon.tsx b/ts/components/session/icon/SessionIcon.tsx index a37acae72..d9d069b17 100644 --- a/ts/components/session/icon/SessionIcon.tsx +++ b/ts/components/session/icon/SessionIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; - import { icons, SessionIconSize, SessionIconType } from '../icon'; import styled, { css, DefaultTheme, keyframes } from 'styled-components'; +import _ from 'lodash'; export type SessionIconProps = { iconType: SessionIconType; @@ -51,7 +51,7 @@ const rotate = keyframes` } `; -const animation = (props: any) => { +const animation = (props: { rotateDuration?: any }) => { if (props.rotateDuration) { return css` ${rotate} ${props.rotateDuration}s infinite linear; @@ -81,9 +81,10 @@ const SessionSvg = (props: { }) => { const colorSvg = props.iconColor || props?.theme?.colors.textColor; const pathArray = props.path instanceof Array ? props.path : [props.path]; + const propsToPick = _.pick(props, 'width', 'animation', 'transform') as any; return ( - + {pathArray.map((path, index) => { return ; })} diff --git a/ts/window.d.ts b/ts/window.d.ts index 9789167f0..547f5e424 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -1,3 +1,5 @@ +import {} from 'styled-components/cssprop'; + import { LocalizerType } from '../types/Util'; import { LibsignalProtocol } from '../../libtextsecure/libsignal-protocol'; import { SignalInterface } from '../../js/modules/signal'; @@ -5,7 +7,6 @@ import { Libloki } from '../libloki'; import { LibTextsecure } from '../libtextsecure'; import { ConfirmationDialogParams } from '../background'; -import {} from 'styled-components/cssprop'; import { ConversationControllerType } from '../js/ConversationController'; import { any } from 'underscore';