Skip to content

Commit b6ef17b

Browse files
committed
chore(web): simplify pnklogo into one styled component and one svg
1 parent 9e13596 commit b6ef17b

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

web/src/assets/svgs/styled/light-mode-pnk.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

web/src/assets/svgs/styled/dark-mode-pnk.svg renamed to web/src/assets/svgs/styled/pnk.svg

Lines changed: 2 additions & 2 deletions
Loading

web/src/components/Popup/MiniGuides/Onboarding/PnkLogoAndTitle.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
2-
import styled, { useTheme } from "styled-components";
3-
import DarkModePnkIcon from "tsx:assets/svgs/styled/dark-mode-pnk.svg";
4-
import LightModePnkIcon from "tsx:assets/svgs/styled/light-mode-pnk.svg";
2+
import styled from "styled-components";
3+
import PnkIcon from "tsx:assets/svgs/styled/pnk.svg";
54

65
const Container = styled.div`
76
display: flex;
@@ -11,9 +10,16 @@ const Container = styled.div`
1110
align-items: center;
1211
`;
1312

14-
const StyledPnkIcon = styled.div`
13+
const StyledPnkIcon = styled(PnkIcon)`
1514
width: calc(220px + (280 - 220) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
1615
height: calc(220px + (252 - 220) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
16+
17+
[class$="stop-1"] {
18+
stop-color: ${({ theme }) => theme.primaryBlue};
19+
}
20+
[class$="stop-2"] {
21+
stop-color: ${({ theme }) => theme.secondaryPurple};
22+
}
1723
`;
1824

1925
const StyledCourtLabel = styled.label`
@@ -29,12 +35,9 @@ const StyledCourtLabel = styled.label`
2935
`;
3036

3137
const PnkLogoAndTitle = () => {
32-
const theme = useTheme();
33-
const PnkIcon = theme.name === "dark" ? DarkModePnkIcon : LightModePnkIcon;
34-
3538
return (
3639
<Container>
37-
<StyledPnkIcon as={PnkIcon} />
40+
<StyledPnkIcon />
3841
<StyledCourtLabel>Court v.2</StyledCourtLabel>
3942
</Container>
4043
);

0 commit comments

Comments
 (0)