Skip to content

Commit 7078553

Browse files
authored
Add language selector to onboarding + progress bar tweak (#156)
* Add language selector to onboarding * Revert unchanged files
1 parent 83573bd commit 7078553

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

renderer/components/LanguageSelector/LanguageSelector.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
useDisclosure,
1010
Flex,
1111
Box,
12+
FlexProps,
1213
} from "@chakra-ui/react";
1314
import { useForm } from "react-hook-form";
1415
import { FaChevronDown } from "react-icons/fa";
@@ -92,7 +93,11 @@ const localeSchema = z.object({
9293
language: z.enum(["en-US", "es-MX", "zh-CN", "ru-RU", "uk-UA"]),
9394
});
9495

95-
export function LanguageSelector() {
96+
type Props = {
97+
buttonContainerProps?: FlexProps;
98+
};
99+
100+
export function LanguageSelector({ buttonContainerProps }: Props) {
96101
const { formatMessage } = useIntl();
97102
const { isOpen, onOpen, onClose } = useDisclosure();
98103
const selectedLocaleContext = useSelectedLocaleContext();
@@ -122,6 +127,7 @@ export function LanguageSelector() {
122127
md: "100%",
123128
}}
124129
onClick={onOpen}
130+
{...buttonContainerProps}
125131
>
126132
<MdOutlineLanguage />
127133
<Text

renderer/layouts/OnboardingLayout.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Image from "next/image";
1111
import { ReactNode } from "react";
1212
import { defineMessages, useIntl } from "react-intl";
1313

14+
import { LanguageSelector } from "@/components/LanguageSelector/LanguageSelector";
1415
import bigOnboardingFish from "@/images/big-onboarding-fish.svg";
1516
import discord from "@/images/discord.png";
1617

@@ -55,7 +56,7 @@ export function OnboardingLayout({ children }: { children: ReactNode }) {
5556
maxW={{
5657
base: "100%",
5758
md: "724px",
58-
"2xl": "900px",
59+
"2xl": "1024px",
5960
}}
6061
position="relative"
6162
w="100%"
@@ -85,8 +86,23 @@ export function OnboardingLayout({ children }: { children: ReactNode }) {
8586
borderTop="1px solid #DEDFE2"
8687
py={3}
8788
alignSelf="stretch"
88-
justifyContent="center"
89+
justifyContent="space-between"
90+
px={{
91+
base: "64px",
92+
"2xl": "152px",
93+
}}
8994
>
95+
<Box>
96+
<LanguageSelector
97+
buttonContainerProps={{
98+
px: {
99+
base: 0,
100+
md: 4,
101+
},
102+
bg: "white",
103+
}}
104+
/>
105+
</Box>
90106
<Box
91107
as="a"
92108
target="_blank"

renderer/ui/theme/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ const theme = extendTheme({
5454
},
5555
}),
5656
Tabs: tabsTheme,
57+
Progress: {
58+
baseStyle: {
59+
track: {
60+
borderRadius: "full",
61+
},
62+
},
63+
},
5764
},
5865
semanticTokens: {
5966
colors: {

0 commit comments

Comments
 (0)