summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components/HeaderBar.tsx
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2023-10-24 13:34:02 +0200
committerOskar Nyberg <oskar@mullvad.net>2023-10-30 18:03:44 +0100
commitdb89a8d51de88ca08599fa331f6376ef477d15e8 (patch)
tree6f484297196d8cd377d090f69aff12d3c51ea5a4 /gui/src/renderer/components/HeaderBar.tsx
parent754b15058eaf37dba76387f803e623a94698242f (diff)
downloadmullvadvpn-db89a8d51de88ca08599fa331f6376ef477d15e8.tar.xz
mullvadvpn-db89a8d51de88ca08599fa331f6376ef477d15e8.zip
Adjust codebase to breaking changes in styled components v6
Diffstat (limited to 'gui/src/renderer/components/HeaderBar.tsx')
-rw-r--r--gui/src/renderer/components/HeaderBar.tsx20
1 files changed, 10 insertions, 10 deletions
diff --git a/gui/src/renderer/components/HeaderBar.tsx b/gui/src/renderer/components/HeaderBar.tsx
index a5c3969f08..98502a6346 100644
--- a/gui/src/renderer/components/HeaderBar.tsx
+++ b/gui/src/renderer/components/HeaderBar.tsx
@@ -29,16 +29,16 @@ const headerBarStyleColorMap = {
};
interface IHeaderBarContainerProps {
- barStyle?: HeaderBarStyle;
- accountInfoVisible: boolean;
- unpinnedWindow: boolean;
+ $barStyle?: HeaderBarStyle;
+ $accountInfoVisible: boolean;
+ $unpinnedWindow: boolean;
}
-const HeaderBarContainer = styled.header({}, (props: IHeaderBarContainerProps) => ({
+const HeaderBarContainer = styled.header<IHeaderBarContainerProps>((props) => ({
padding: '15px 11px 0px 16px',
- minHeight: props.accountInfoVisible ? '80px' : '68px',
- height: props.accountInfoVisible ? '80px' : '68px',
- backgroundColor: headerBarStyleColorMap[props.barStyle ?? HeaderBarStyle.default],
+ minHeight: props.$accountInfoVisible ? '80px' : '68px',
+ height: props.$accountInfoVisible ? '80px' : '68px',
+ backgroundColor: headerBarStyleColorMap[props.$barStyle ?? HeaderBarStyle.default],
transitionProperty: 'height, min-height',
transitionDuration: '250ms',
transitionTimingFunction: 'ease-in-out',
@@ -63,10 +63,10 @@ export default function HeaderBar(props: IHeaderBarProps) {
return (
<HeaderBarContainer
- barStyle={props.barStyle}
+ $barStyle={props.barStyle}
className={props.className}
- accountInfoVisible={props.showAccountInfo ?? false}
- unpinnedWindow={unpinnedWindow}>
+ $accountInfoVisible={props.showAccountInfo ?? false}
+ $unpinnedWindow={unpinnedWindow}>
<HeaderBarContent>{props.children}</HeaderBarContent>
{props.showAccountInfo && <HeaderBarDeviceInfo />}
</HeaderBarContainer>