Skip to content

Commit

Permalink
Update breakpoints (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
OKendigelyan authored Sep 17, 2024
1 parent 1a040a5 commit 088e1c7
Show file tree
Hide file tree
Showing 32 changed files with 91 additions and 91 deletions.
20 changes: 10 additions & 10 deletions apps/web/src/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ export const Layout = () => {
return (
<Grid
justifyContent="center"
gridGap={{ lg: "20px", base: "12px" }}
gridTemplateRows={{ base: "auto auto 1fr auto", lg: "auto auto 1fr auto" }}
gridTemplateColumns={{ base: "1fr", lg: "340px minmax(min-content, 1060px)" }}
gridGap={{ md: "20px", base: "12px" }}
gridTemplateRows={{ base: "auto auto 1fr auto", md: "auto auto 1fr auto" }}
gridTemplateColumns={{ base: "1fr", md: "340px minmax(min-content, 1060px)" }}
gridTemplateAreas={{
base: '"header" "sidebar" "main" "footer" "nav"',
lg: `"header header" "sidebar nav" "sidebar main" "footer main"`,
md: `"header header" "sidebar nav" "sidebar main" "footer main"`,
}}
height={{ lg: "100vh", base: "100dvh" }}
padding={{ lg: "20px 46px 0", base: "54px 0 0" }}
height={{ md: "100vh", base: "100dvh" }}
padding={{ md: "20px 46px 0", base: "54px 0 0" }}
data-testid="signed-in-layout"
>
<GridItem
position={{ base: "fixed", lg: "static" }}
position={{ base: "fixed", md: "static" }}
zIndex={{ base: 2 }}
top={{ base: 0 }}
left={{ base: 0 }}
Expand All @@ -47,7 +47,7 @@ export const Layout = () => {
gridArea="main"
paddingX={{
base: "12px",
lg: "0",
md: "0",
}}
>
<Main />
Expand All @@ -56,15 +56,15 @@ export const Layout = () => {
gridArea="sidebar"
paddingX={{
base: "12px",
lg: "0",
md: "0",
}}
>
<Sidebar />
</GridItem>
<GridItem
gridArea="footer"
marginTop={{ base: "20px" }}
marginBottom={{ base: "20px", lg: "46px" }}
marginBottom={{ base: "20px", md: "46px" }}
>
<Footer />
</GridItem>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/AccountCard/AccountBalance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const AccountBalance = () => {
<Text
display={{
base: "none",
lg: "block",
md: "block",
}}
color={color("600")}
fontWeight="600"
Expand All @@ -49,7 +49,7 @@ export const AccountBalance = () => {
<Flex
alignItems="center"
justifyContent="space-between"
marginTop={{ base: "20px", lg: "40px" }}
marginTop={{ base: "20px", md: "40px" }}
>
<IconButtonWithText
as={Link}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const meta: Meta<StoryProps> = {

return (
<Provider store={store}>
<Box width="100%" maxWidth={{ lg: "600px" }}>
<Box width="100%" maxWidth={{ md: "600px" }}>
<AccountCard />
</Box>
</Provider>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/AccountCard/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const AccountCard = () => {
<Card
gap={{
base: "16px",
lg: "20px",
md: "20px",
}}
padding="8px 8px 20px 8px"
borderRadius="40px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Suggestions = ({
border="1px solid"
borderColor={color("400")}
borderRadius="8px"
transform={{ base: "translateY(calc(-100% - 66px))", lg: "unset" }}
transform={{ base: "translateY(calc(-100% - 66px))", md: "unset" }}
data-testid="suggestions-list"
listStyleType="none"
>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/BackButton/BaseBackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export const BaseBackButton = (props: Omit<IconButtonProps, "aria-label">) => (
position="absolute"
top={{
base: "12px",
lg: "18px",
md: "18px",
}}
left={{
base: "12px",
lg: "18px",
md: "18px",
}}
padding="0"
aria-label="Go back"
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/CloseButton/BaseCloseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export const BaseCloseButton = (props: Omit<IconButtonProps, "aria-label">) => (
position="absolute"
top={{
base: "12px",
lg: "18px",
md: "18px",
}}
right={{
base: "12px",
lg: "18px",
md: "18px",
}}
padding="0"
icon={<CloseIcon width="24px" height="24px" />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const ColorSchemeModeToggle = () => {
gap="14px"
display={{
base: "none",
lg: "flex",
md: "flex",
}}
>
{switchText}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/EmptyMessage/EmptyMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const EmptyMessage = ({
data-testid="empty-state-message"
{...props}
>
<Text color={color("900")} fontWeight="600" size={{ base: "xl", lg: "2xl" }}>
<Text color={color("900")} fontWeight="600" size={{ base: "xl", md: "2xl" }}>
{title}
</Text>
{subtitle && (
Expand All @@ -39,7 +39,7 @@ export const EmptyMessage = ({
whiteSpace="pre-line"
size={{
base: "md",
lg: "lg",
md: "lg",
}}
>
{subtitle}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export const Footer = () => {
<Flex
justifyContent={{
base: "center",
lg: "flex-start",
md: "flex-start",
}}
fontSize={{
base: "sm",
lg: "md",
md: "md",
}}
lineHeight="1"
>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Header/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Actions = () => {
as={MenuIcon}
width={{
base: "18px",
lg: "24px",
md: "24px",
}}
height="auto"
/>
Expand All @@ -27,7 +27,7 @@ export const Actions = () => {
onClick={() => openWith(<Menu />)}
size={{
base: "md",
lg: "lg",
md: "lg",
}}
variant="iconButtonSolid"
/>
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Header = () => {
width: "42px",
height: "42px",
},
lg: {
md: {
width: "48px",
height: "48px",
},
Expand Down Expand Up @@ -52,11 +52,11 @@ export const Header = () => {
<Card
justifyContent="space-between"
flexDirection="row"
padding={{ base: "6px 12px", lg: "10px 20px" }}
borderRadius={{ base: 0, lg: "100px" }}
padding={{ base: "6px 12px", md: "10px 20px" }}
borderRadius={{ base: 0, md: "100px" }}
boxShadow={{
base: "0px 4px 10px 0px rgba(45, 55, 72, 0.06)",
lg: "2px 4px 12px 0px rgba(45, 55, 72, 0.05)",
md: "2px 4px 12px 0px rgba(45, 55, 72, 0.05)",
}}
>
{mode(<Icon as={LogoLightIcon} {...size} />, <Icon as={LogoDarkIcon} {...size} />)(colorMode)}
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/components/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { Tokens } from "../../views/Tokens";
export const Main = () => (
<Box
overflowY="auto"
height={{ lg: "calc(100% + 29px)" }}
marginTop={{ lg: "-75px" }}
paddingTop={{ lg: "75px" }}
height={{ md: "calc(100% + 29px)" }}
marginTop={{ md: "-75px" }}
paddingTop={{ md: "75px" }}
borderRadius="30px"
>
<Card minHeight="full" borderRadius="30px">
<CardBody
as={Flex}
padding={{
base: "18px",
lg: "40px",
md: "40px",
}}
>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const AddressBookMenu = () => {
>
Add Contact
</Button>
<Divider marginTop={{ base: "36px", lg: "40px" }} />
<Divider marginTop={{ base: "36px", md: "40px" }} />
{contacts.length ? (
<VStack
alignItems="flex-start"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Menu/AppsMenu/AppsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const AppsMenu = () => {
>
Connect
</Button>
<Divider marginTop={{ base: "36px", lg: "40px" }} />
<Divider marginTop={{ base: "36px", md: "40px" }} />
<BeaconPeers />
</DrawerContentWrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Menu/DrawerContentWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const DrawerContentWrapper = ({
<>
<DrawerBackButton />
<DrawerCloseButton />
<DrawerBody as={Flex} flexDirection="column" paddingTop={{ base: "78px", lg: "90px" }}>
<DrawerBody as={Flex} flexDirection="column" paddingTop={{ base: "78px", md: "90px" }}>
{title && (
<Heading color={color("900")} size="2xl">
{title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const ErrorLogsMenu = () => {
</Button>
</Flex>
)}
<Divider marginTop={{ base: "36px", lg: "40px" }} />
<Divider marginTop={{ base: "36px", md: "40px" }} />
{errors.length ? (
<Box overflowY="auto">
<VStack
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Menu/GenericMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type GenericMenuProps = {
export const GenericMenu = ({ title, menuItems }: GenericMenuProps) => (
<DrawerContentWrapper title={title}>
<VStack
gap={{ base: "18px", lg: "24px" }}
marginTop={title ? { base: "36px", lg: "40px" } : 0}
gap={{ base: "18px", md: "24px" }}
marginTop={title ? { base: "36px", md: "40px" } : 0}
divider={<Divider />}
spacing="0"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Menu/NetworkMenu/NetworkMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const NetworkMenu = () => {
>
Add New
</Button>
<Divider marginTop={{ base: "36px", lg: "40px" }} />
<Divider marginTop={{ base: "36px", md: "40px" }} />
<RadioGroup onChange={selectNetwork} value={currentNetwork.name}>
<VStack
alignItems="flex-start"
Expand Down
10 changes: 5 additions & 5 deletions apps/web/src/components/MnemonicWord/MnemonicWord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const MnemonicWord = ({ index, word, autocompleteProps, ...props }: Mnemo
<Text
position="absolute"
zIndex={1}
marginTop={{ lg: "11px", base: "8px" }}
marginLeft={{ lg: "16px", base: "10px" }}
marginTop={{ md: "11px", base: "8px" }}
marginLeft={{ md: "16px", base: "10px" }}
color={color("300")}
textAlign="right"
size={{ lg: "lg", base: "xs" }}
size={{ md: "lg", base: "xs" }}
>
{String(index + 1).padStart(2, "0")}.
</Text>
Expand All @@ -31,8 +31,8 @@ export const MnemonicWord = ({ index, word, autocompleteProps, ...props }: Mnemo
<Text
alignSelf="center"
paddingRight="10px"
paddingLeft={{ base: "30px", lg: "48px" }}
fontSize={{ base: "xs", lg: "lg" }}
paddingLeft={{ base: "30px", md: "48px" }}
fontSize={{ base: "xs", md: "lg" }}
fontWeight="medium"
>
{word}
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ const tabs = [
export const Navbar = () => (
<Card
zIndex={1}
padding={{ base: "6px 12px", lg: "10px" }}
padding={{ base: "6px 12px", md: "10px" }}
opacity={0.95}
borderRadius={{ base: 0, lg: "100px" }}
borderRadius={{ base: 0, md: "100px" }}
boxShadow={{
base: "-2px -4px 10px 0px rgba(45, 55, 72, 0.06)",
lg: "2px 4px 12px 0px rgba(45, 55, 72, 0.05)",
md: "2px 4px 12px 0px rgba(45, 55, 72, 0.05)",
}}
>
<Tabs defaultIndex={-1} isFitted variant="solid-rounded">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const OnboardOptions = ({ children }: PropsWithChildren) => {
</Heading>

<Center flexDirection="column" gap="36px" width="full" height="full">
<Flex gap={{ base: "24px", lg: "30px" }} marginTop="30px" color={color("white", "black")}>
<Flex gap={{ base: "24px", md: "30px" }} marginTop="30px" color={color("white", "black")}>
<AccountTileWrapper>
<OnboardWithGoogleButton />
</AccountTileWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const RecordSeedphraseModal = ({ seedPhrase }: CopySeedphraseModalProps)
<MnemonicWord
key={index}
as={Flex}
height={{ lg: "48px", base: "34px" }}
height={{ md: "48px", base: "34px" }}
color="black"
border="1px solid"
borderWidth="1.5px"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/TabSwitch/TabSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { useColor } from "../../styles/useColor";
export const TabSwitch = ({ options }: { options: string[] }) => {
const color = useColor();
const { selectedIndex, setSelectedIndex } = useTabsContext();
const isMobile = useBreakpointValue({ base: true, lg: false });
const isMobile = useBreakpointValue({ base: true, md: false });
const [isAccordionCollapsed, setIsAccordionCollapsed] = useState(true);
const currentTab = options[selectedIndex];

Expand Down
Loading

1 comment on commit 088e1c7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title Lines Statements Branches Functions
apps/desktop Coverage: 83%
83.79% (1758/2098) 78.94% (825/1045) 78.45% (448/571)
apps/web Coverage: 83%
83.79% (1758/2098) 78.94% (825/1045) 78.45% (448/571)
packages/components Coverage: 97%
97.1% (134/138) 96.49% (55/57) 82.92% (34/41)
packages/core Coverage: 82%
82.89% (223/269) 73.18% (101/138) 81.35% (48/59)
packages/crypto Coverage: 100%
100% (28/28) 100% (3/3) 100% (5/5)
packages/data-polling Coverage: 98%
96.55% (140/145) 95.45% (21/22) 92.85% (39/42)
packages/multisig Coverage: 98%
98.47% (129/131) 89.47% (17/19) 100% (35/35)
packages/social-auth Coverage: 100%
100% (21/21) 100% (11/11) 100% (3/3)
packages/state Coverage: 84%
83.64% (772/923) 80.78% (164/203) 78.22% (291/372)
packages/tezos Coverage: 86%
85.57% (89/104) 89.47% (17/19) 82.75% (24/29)
packages/tzkt Coverage: 86%
84.05% (58/69) 81.25% (13/16) 76.92% (30/39)

Please sign in to comment.