Skip to content

Commit 54302b4

Browse files
Merge branch 'upgrade-styled-components'
2 parents 2bf4038 + dc781b8 commit 54302b4

File tree

5 files changed

+97
-86
lines changed

5 files changed

+97
-86
lines changed

desktop/package-lock.json

+92-80
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

desktop/packages/mullvad-vpn/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"redux": "^4.2.0",
2626
"simple-plist": "^1.3.1",
2727
"sprintf-js": "^1.1.2",
28-
"styled-components": "^6.1.0",
28+
"styled-components": "^6.1.13",
2929
"nseventforwarder": "0.0.0"
3030
},
3131
"optionalDependencies": {

desktop/packages/mullvad-vpn/src/renderer/components/Accordion.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components';
33

44
interface IProps {
55
expanded: boolean;
6-
animationDuration: number;
6+
animationDuration?: number;
77
children?: React.ReactNode;
88
onWillExpand?: (contentHeight: number) => void;
99
onTransitionEnd?: () => void;
@@ -33,7 +33,6 @@ const Content = styled.div({
3333
export default class Accordion extends React.Component<IProps, IState> {
3434
public static defaultProps = {
3535
expanded: true,
36-
animationDuration: 350,
3736
};
3837

3938
public state: IState = {
@@ -58,7 +57,7 @@ export default class Accordion extends React.Component<IProps, IState> {
5857
ref={this.containerRef}
5958
className={this.props.className}
6059
$height={this.state.containerHeight}
61-
$animationDuration={this.props.animationDuration}
60+
$animationDuration={this.props.animationDuration ?? 350}
6261
onTransitionEnd={this.onTransitionEnd}>
6362
<Content ref={this.contentRef}>{this.state.mountChildren && this.props.children}</Content>
6463
</Container>

desktop/packages/mullvad-vpn/src/renderer/components/Filter.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function useProviders(): Record<string, boolean> {
214214

215215
const StyledSelector = styled(Selector)({
216216
marginBottom: 0,
217-
});
217+
}) as typeof Selector;
218218

219219
interface IFilterByOwnershipProps {
220220
ownership: Ownership;

desktop/packages/mullvad-vpn/src/renderer/components/SelectLanguage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import SettingsHeader, { HeaderTitle } from './SettingsHeader';
2121

2222
const StyledSelector = styled(Selector)({
2323
marginBottom: 0,
24-
});
24+
}) as typeof Selector;
2525

2626
export default function SelectLanguage() {
2727
const { pop } = useHistory();

0 commit comments

Comments
 (0)