Skip to content

Commit

Permalink
Merge branch 'upgrade-styled-components'
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Dec 3, 2024
2 parents 2bf4038 + dc781b8 commit 54302b4
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 86 deletions.
172 changes: 92 additions & 80 deletions desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion desktop/packages/mullvad-vpn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"redux": "^4.2.0",
"simple-plist": "^1.3.1",
"sprintf-js": "^1.1.2",
"styled-components": "^6.1.0",
"styled-components": "^6.1.13",
"nseventforwarder": "0.0.0"
},
"optionalDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components';

interface IProps {
expanded: boolean;
animationDuration: number;
animationDuration?: number;
children?: React.ReactNode;
onWillExpand?: (contentHeight: number) => void;
onTransitionEnd?: () => void;
Expand Down Expand Up @@ -33,7 +33,6 @@ const Content = styled.div({
export default class Accordion extends React.Component<IProps, IState> {
public static defaultProps = {
expanded: true,
animationDuration: 350,
};

public state: IState = {
Expand All @@ -58,7 +57,7 @@ export default class Accordion extends React.Component<IProps, IState> {
ref={this.containerRef}
className={this.props.className}
$height={this.state.containerHeight}
$animationDuration={this.props.animationDuration}
$animationDuration={this.props.animationDuration ?? 350}
onTransitionEnd={this.onTransitionEnd}>
<Content ref={this.contentRef}>{this.state.mountChildren && this.props.children}</Content>
</Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function useProviders(): Record<string, boolean> {

const StyledSelector = styled(Selector)({
marginBottom: 0,
});
}) as typeof Selector;

interface IFilterByOwnershipProps {
ownership: Ownership;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import SettingsHeader, { HeaderTitle } from './SettingsHeader';

const StyledSelector = styled(Selector)({
marginBottom: 0,
});
}) as typeof Selector;

export default function SelectLanguage() {
const { pop } = useHistory();
Expand Down

0 comments on commit 54302b4

Please sign in to comment.