From d42ee94149ce1b8327245da3802910c684712e27 Mon Sep 17 00:00:00 2001 From: Sergey Kintsel Date: Sat, 21 Oct 2023 12:39:46 +0100 Subject: [PATCH] Adjust help & settings pages to design --- src/assets/icons/ChevronDown.tsx | 3 +- src/components/ClickableCard.tsx | 42 +++++---- src/views/help/HelpView.tsx | 104 +++++++++------------ src/views/settings/BeaconDrawerCard.tsx | 2 +- src/views/settings/ErrorLogsDrawerCard.tsx | 2 +- src/views/settings/SettingsView.tsx | 21 +++-- 6 files changed, 84 insertions(+), 90 deletions(-) diff --git a/src/assets/icons/ChevronDown.tsx b/src/assets/icons/ChevronDown.tsx index b246ca8f18..b75a6b1fd5 100644 --- a/src/assets/icons/ChevronDown.tsx +++ b/src/assets/icons/ChevronDown.tsx @@ -4,17 +4,16 @@ import colors from "../../style/colors"; const ChevronDownIcon: React.FC = props => { return ( void; - h?: LayoutProps["h"]; - children: React.ReactNode; -}> = ({ onClick, h, children }) => { +const ClickableCard: React.FC< + { + onClick?: () => void; + children: React.ReactNode; + isSelected: boolean; + } & CardProps +> = ({ onClick, children, isSelected, ...props }) => { return ( - {children} + {children} ); }; @@ -26,9 +33,10 @@ export const SettingsCard: React.FC<{ left: string; onClick?: () => void; children: React.ReactNode; -}> = ({ left, onClick, children }) => { + isSelected: boolean; +}> = ({ left, onClick, isSelected, children }) => { return ( - + {left} @@ -41,19 +49,17 @@ export const SettingsCard: React.FC<{ export const SettingsCardWithDrawerIcon: React.FC<{ left: string; + isSelected: boolean; onClick?: () => void; -}> = ({ left, onClick }) => { +}> = ({ left, isSelected, onClick }) => { return ( - + ); diff --git a/src/views/help/HelpView.tsx b/src/views/help/HelpView.tsx index 451d459549..a0674f7f9c 100644 --- a/src/views/help/HelpView.tsx +++ b/src/views/help/HelpView.tsx @@ -1,11 +1,11 @@ import { Flex, Grid, GridItem } from "@chakra-ui/layout"; -import { Box, Text, Divider, Heading, Icon } from "@chakra-ui/react"; -import { FiExternalLink } from "react-icons/fi"; +import { Box, Text, Heading, Center } from "@chakra-ui/react"; import React from "react"; import { TopBar } from "../../components/TopBar"; import colors from "../../style/colors"; -import ClickableCard from "../../components/ClickableCard"; +import ClickableCard, { SettingsCard } from "../../components/ClickableCard"; import { navigateToExternalLink } from "../../utils/helpers"; +import ExternalLinkIcon from "../../assets/icons/ExternalLink"; export default function HelpView() { return ( @@ -52,50 +52,39 @@ export default function HelpView() { /> - - - - Contact our Support Team - navigateToExternalLink("mailto:umami-support@trili.tech")} - > - umami-support@trili.tech - - - - - - - - - - Get in touch with the Community - - - navigateToExternalLink( - "https://join.slack.com/t/tezos-dev/shared_invite/zt-1ur1ymxrp-G_X_bFHrvWXwoeiy53J8lg" - ) - } - > - Slack #Umami - - - - - + + + Need Help? + + navigateToExternalLink("mailto:umami-support@trili.tech")} + isSelected={false} + > +
+ + umami-support@trili.tech + + +
+
+ + navigateToExternalLink( + "https://join.slack.com/t/tezos-dev/shared_invite/zt-1ur1ymxrp-G_X_bFHrvWXwoeiy53J8lg" + ) + } + > +
+ + Slack #Umami + + +
+
+
)} - +
); @@ -159,11 +139,15 @@ const HelpCard: React.FC<{ children: React.ReactNode; }> = ({ title, onClick, children }) => { return ( - + - {title} - {children} + + {title} + + + {children} + diff --git a/src/views/settings/BeaconDrawerCard.tsx b/src/views/settings/BeaconDrawerCard.tsx index dfcdfca429..e2453756d3 100644 --- a/src/views/settings/BeaconDrawerCard.tsx +++ b/src/views/settings/BeaconDrawerCard.tsx @@ -21,7 +21,7 @@ export const BeaconDrawerCard = () => { const { isOpen: isDynamicModalOpen } = useDynamicModal(); return ( <> - + { return ( <> - + - + + + @@ -36,10 +38,8 @@ const GeneralSection = () => { */} - - - - + + @@ -129,8 +129,13 @@ const AdvancedSection = () => { TODO: implement this {}} /> */} - + openWith()} /> @@ -144,10 +149,10 @@ const SectionContainer: React.FC<{ children: React.ReactNode; }> = ({ title, children }) => { return ( - + - + {title} {children}