Skip to content

Commit

Permalink
final type error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
odb23 committed Jan 29, 2023
1 parent bc23740 commit 37645fc
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/components/Animation/Animation.style.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components'

export const Component = styled.div``
export const Component = styled.div<any>``

export const Container = styled.div<any>`
.animated {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Carousel/CarouselItem/CarouselItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect, useRef } from "react";
import React, { useState } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
import { ThemeProvider } from "styled-components";
Expand Down
75 changes: 37 additions & 38 deletions src/components/DropDown/DropDownMenu/DropDownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ const DropDownMenu = (props: Props) => {
const position1 = dropup
? 'top'
: dropright
? 'right'
: dropleft
? 'left'
: 'bottom'
? 'right'
: dropleft
? 'left'
: 'bottom'

const position2 = right ? 'end' : 'start'

Expand All @@ -117,40 +117,39 @@ const DropDownMenu = (props: Props) => {
{(show) =>
show
? ({ scale, opacity, top: topOffset }) => (
<Popper
placement={attrs.placement}
modifiers={animatedModifiers}
>
{({
ref,
style: { top, left, position },
placement,
arrowProps
}) => (
<Component
className={dropDownMenuClasses}
ref={ref}
style={{
opacity,
top: 0,
left: 0,
position,
padding: '1em',
transform: `translate3d(${left}, ${(top
? typeof top === 'string'
? parseInt(top)
: top
: 0) + topOffset
}px, 0) scale(${scale})`,
transformOrigin: 'top center'
}}
data-placement={placement}
>
{children}
</Component>
)}
</Popper>
)
<Popper
placement={attrs.placement}
modifiers={animatedModifiers}
>
{({
ref,
style: { top, left, position },
placement,
arrowProps
}) => {
const newTop = typeof top === 'string' && top ? parseInt(top) : top
const topVal = (!isNaN(+newTop) ? +newTop : 0) + topOffset
return (
<Component
className={dropDownMenuClasses}
ref={ref}
style={{
opacity,
top: 0,
left: 0,
position,
padding: '1em',
transform: `translate3d(${left}, ${topVal}px, 0) scale(${scale})`,
transformOrigin: 'top center'
}}
data-placement={placement}
>
{children}
</Component>
)
}}
</Popper>
)
: Null
}
</Transition>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Mask/Mask.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const {
pattern8,
pattern9,
} = patternGroup;
export const Component = styled("span")(
export const Component = styled<any>("span")(
space,
colorStyle,
{
Expand Down Expand Up @@ -182,4 +182,4 @@ export const Component = styled("span")(
},
},
})
)<any>;
);
14 changes: 7 additions & 7 deletions src/components/View/View.style.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import styled, { css } from "styled-components";


interface Props {
zoom: boolean
rounded: boolean
hover: boolean
}
// interface Props {
// zoom: boolean
// rounded: boolean
// hover: boolean
// }

export const Component = styled.div<Props>`
export const Component = styled.div<any>`
position: relative;
overflow: hidden;
cursor: default;
${(props) => {
props.zoom
return props.zoom
? css`
img,
video {
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"noImplicitAny": false,
"strictNullChecks": false,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"allowSyntheticDefaultImports": true
},
"include": ["src"],
Expand Down

0 comments on commit 37645fc

Please sign in to comment.