From 614f02a3473f16591cd16364f0bc46ae27448522 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Sat, 7 Dec 2024 23:49:44 +0300 Subject: [PATCH] fix: toolbar button widths --- src/containers/Modals/UpgradeModal/index.tsx | 136 ++++++++----------- src/containers/Toolbar/AccountMenu.tsx | 30 ---- src/containers/Toolbar/ZoomMenu.tsx | 2 +- src/containers/Toolbar/index.tsx | 10 +- 4 files changed, 62 insertions(+), 116 deletions(-) delete mode 100644 src/containers/Toolbar/AccountMenu.tsx diff --git a/src/containers/Modals/UpgradeModal/index.tsx b/src/containers/Modals/UpgradeModal/index.tsx index cdfd8825f3d..be4f734a1dc 100644 --- a/src/containers/Modals/UpgradeModal/index.tsx +++ b/src/containers/Modals/UpgradeModal/index.tsx @@ -8,17 +8,17 @@ import { Stack, Title, ThemeIcon, - AspectRatio, - Paper, CloseButton, FocusTrap, + Image, + Divider, } from "@mantine/core"; import { LuCrown, LuTrendingUp } from "react-icons/lu"; export const UpgradeModal = ({ opened, onClose }: ModalProps) => { return ( { overlayProps={{ blur: 1 }} > - - - - Upgrade to unlock all features - - - - - - - - - - Accurate & beautiful diagrams + <Flex> + <Image src="./assets/todiagram_img.webp" alt="todiagram" w="350" fit="contain" px="lg" /> + <Divider orientation="vertical" /> + <Stack gap="24" px="40" py="20"> + <Flex justify="space-between"> + <Title c="bright" fw="500" fz="24"> + Upgrade to unlock all features - - New diagram structure helps you to understand the data, modify from diagrams, - customize colors, preview images. - - - - - - - - - - Larger file support, faster performance - - - Load up to 4MB without performance issues, open multiple documents, and save work - faster. - - - - - - - - - - - + + + + + + + + + Accurate & beautiful diagrams + + + New diagram structure helps you to understand the data, modify from diagrams, + customize colors, preview images. + + + + + + + + + + Larger file support, faster performance + + + Load up to 4MB without performance issues, open multiple documents, and save work + faster. + + + + + + + ); }; diff --git a/src/containers/Toolbar/AccountMenu.tsx b/src/containers/Toolbar/AccountMenu.tsx deleted file mode 100644 index f94af376826..00000000000 --- a/src/containers/Toolbar/AccountMenu.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react"; -import { Menu, Avatar, Text } from "@mantine/core"; -import { FaRegCircleUser } from "react-icons/fa6"; -import { VscSignIn } from "react-icons/vsc"; -import { StyledToolElement } from "./styles"; - -export const AccountMenu = () => { - return ( - - - - - - - - - - } - rel="noopener" - > - Sign up - - - - ); -}; diff --git a/src/containers/Toolbar/ZoomMenu.tsx b/src/containers/Toolbar/ZoomMenu.tsx index 085b72b4bf9..e46ca9106df 100644 --- a/src/containers/Toolbar/ZoomMenu.tsx +++ b/src/containers/Toolbar/ZoomMenu.tsx @@ -28,7 +28,7 @@ export const ZoomMenu = () => { gaEvent("show_zoom_menu")}> - + {Math.round(zoomFactor * 100)}% diff --git a/src/containers/Toolbar/index.tsx b/src/containers/Toolbar/index.tsx index 6a1689ea2e8..415da12801c 100644 --- a/src/containers/Toolbar/index.tsx +++ b/src/containers/Toolbar/index.tsx @@ -10,7 +10,6 @@ import { type FileFormat, formats } from "src/enums/file.enum"; import { JSONCrackLogo } from "src/layout/JsonCrackLogo"; import useFile from "src/store/useFile"; import useModal from "src/store/useModal"; -import { AccountMenu } from "./AccountMenu"; import { FileMenu } from "./FileMenu"; import { Logo } from "./Logo"; import { OptionsMenu } from "./OptionsMenu"; @@ -84,20 +83,20 @@ export const Toolbar = ({ isWidget = false }: ToolbarProps) => { )} - + {!isWidget && ( )} - {!isWidget && ( <> @@ -105,7 +104,6 @@ export const Toolbar = ({ isWidget = false }: ToolbarProps) => { -