diff --git a/src/ImportSeed.tsx b/src/ImportSeed.tsx index 5ceb2e843e..e4d11584bb 100644 --- a/src/ImportSeed.tsx +++ b/src/ImportSeed.tsx @@ -8,10 +8,15 @@ import { request } from "./utils/datocms/request"; import { useEffect, useState } from "react"; import colors from "./style/colors"; import { AppVersion } from "./components/AppVersion"; +import BackgroundImage from "./assets/onboarding/background_image.png"; function ImportSeed() { - const { onOpen, modalElement } = useOnboardingModal(); - + const [showSlider, setShowSlider] = useState(true); + const { onOpen, modalElement } = useOnboardingModal(() => setShowSlider(true)); + const openModal = () => { + setShowSlider(false); + onOpen(); + }; const [slideItems, setSlideItems] = useState([]); const requestSliderItems = async () => { const result = await request(AllSlideritemsDocument); @@ -23,38 +28,44 @@ function ImportSeed() { }, []); return ( - - -
- - - Welcome to Umami - - A powerful Tezos wallet - - - {modalElement} - -
- - - {slideItems.map((item, index) => { - return ; - })} - - -
-
+
+ {showSlider && ( + +
+ + + + Welcome to Umami + + + + A powerful Tezos wallet + + + + +
+ + + {slideItems.map((item, index) => { + return ; + })} + + +
+ )} + {modalElement} +
); } diff --git a/src/assets/onboarding/background_image.png b/src/assets/onboarding/background_image.png new file mode 100644 index 0000000000..15d9981b2f Binary files /dev/null and b/src/assets/onboarding/background_image.png differ diff --git a/src/components/CircleIcon.tsx b/src/components/CircleIcon.tsx index f19d0fb602..021aa8a4ff 100644 --- a/src/components/CircleIcon.tsx +++ b/src/components/CircleIcon.tsx @@ -24,7 +24,13 @@ type Props = { onClick?: () => void; }; -export const CircleIcon = ({ icon, size, color = colors.gray[400], onClick = () => {} }: Props) => { +export const CircleIcon = ({ + icon, + size, + iconSize = "18px", + color = colors.gray[400], + onClick = () => {}, +}: Props) => { const CompName = iconMap[icon]; return (
- +
); diff --git a/src/components/MakiLogo.tsx b/src/components/MakiLogo.tsx index 968672231f..86cd2de93a 100644 --- a/src/components/MakiLogo.tsx +++ b/src/components/MakiLogo.tsx @@ -1,9 +1,12 @@ import React from "react"; -import { Image } from "@chakra-ui/react"; +import { Image, ImageProps } from "@chakra-ui/react"; import makiLogo from "../assets/maki-default.png"; -export const MakiLogo: React.FC<{ size?: string | number }> = ({ size = 100 }) => { - return Maki logo; +export const MakiLogo: React.FC<{ size?: string | number } & ImageProps> = ({ + size = 100, + ...props +}) => { + return Maki logo; }; diff --git a/src/components/Onboarding/useOnboardingModal.tsx b/src/components/Onboarding/useOnboardingModal.tsx index c3ea82f188..ffa3641a6f 100644 --- a/src/components/Onboarding/useOnboardingModal.tsx +++ b/src/components/Onboarding/useOnboardingModal.tsx @@ -5,7 +5,6 @@ import { ModalOverlay, useDisclosure, } from "@chakra-ui/react"; -import ModalBackground from "../../assets/onboarding/background_image.svg"; import { useImplicitAccounts } from "../../utils/hooks/accountHooks"; import ConnectOptions from "./connectOptions/ConnectOptions"; import ConnectOrCreate from "./connectOrCreate/ConnectOrCreate"; @@ -85,7 +84,7 @@ export type Step = | MasterPasswordStep | FakeAccountStep; -export const useOnboardingModal = () => { +export const useOnboardingModal = (onModalClose?: () => void) => { const { isOpen, onOpen, onClose } = useDisclosure(); const hasAccounts = useImplicitAccounts().length !== 0; const history = useStepHistory({ @@ -95,6 +94,9 @@ export const useOnboardingModal = () => { const closeModal = () => { history.reset(); + if (onModalClose) { + onModalClose(); + } onClose(); }; @@ -137,13 +139,7 @@ export const useOnboardingModal = () => { isCentered autoFocus={false} > - + + - - {item.text} + + + {item.text} + ); }