Skip to content

Commit 81899bd

Browse files
author
Jakub Holak
committed
Fix new tsc version breaking changes
1 parent 5744c92 commit 81899bd

File tree

4 files changed

+29
-73
lines changed

4 files changed

+29
-73
lines changed

package-lock.json

Lines changed: 18 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@types/react-dom": "^16.9.0",
2020
"@types/react-modal": "^3.10.5",
2121
"@types/storybook__addon-info": "^5.2.1",
22-
"@types/styled-components": "^4.4.2",
22+
"@types/styled-components": "^5.1.0",
2323
"@types/styled-system": "^5.1.7",
2424
"mini-svg-data-uri": "^1.1.3",
2525
"polished": "^3.4.4",

src/components/dropdown/Dropdown.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ export const Dropdown: FunctionComponent<DropdownProps & SpaceProps> = ({
117117

118118
return (
119119
<DropdownWrapper
120-
onMouseLeave={() => isOpen && setIsOpen(false)}
121120
value={value}
122121
{...props}
122+
{...(!props.onMouseLeave && {
123+
onMouseLeave: () => isOpen && setIsOpen(false),
124+
})}
123125
>
124126
<DropdownButton
125127
name={name}

src/components/form/Form.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ export const CancelButton: FunctionComponent<InputProps> = ({
5656
export const SubmitButton: FunctionComponent<InputProps> = ({
5757
name,
5858
...props
59-
}) => <StyledSubmit name={name || "Submit"} type="submit" {...props} />;
59+
}) => (
60+
<StyledSubmit
61+
name={name || "Submit"}
62+
{...props}
63+
{...(!props.type && { type: "submit" })}
64+
/>
65+
);
6066

6167
export const Form: FunctionComponent<InputProps> = ({ children, ...props }) => (
6268
<Container {...props}>{children}</Container>

0 commit comments

Comments
 (0)