From 8f09f66bb09191e8916283089d09dd2c58c021a8 Mon Sep 17 00:00:00 2001 From: Bill He Date: Mon, 2 Oct 2023 12:30:20 -0400 Subject: [PATCH] rename --- src/views/dialogs/ExternalNavKeplrDialog.tsx | 107 +++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 src/views/dialogs/ExternalNavKeplrDialog.tsx diff --git a/src/views/dialogs/ExternalNavKeplrDialog.tsx b/src/views/dialogs/ExternalNavKeplrDialog.tsx new file mode 100644 index 0000000..505d2a2 --- /dev/null +++ b/src/views/dialogs/ExternalNavKeplrDialog.tsx @@ -0,0 +1,107 @@ +import styled, { type AnyStyledComponent } from 'styled-components'; + +import { ButtonAction, ButtonSize, ButtonType } from '@/constants/buttons'; +import { STRING_KEYS } from '@/constants/localization'; +import { useBreakpoints, useStringGetter } from '@/hooks'; + +import { Button } from '@/components/Button'; +import { Dialog, DialogPlacement } from '@/components/Dialog'; +import { IconName } from '@/components/Icon'; +import { IconButton } from '@/components/IconButton'; + +import { layoutMixins } from '@/styles/layoutMixins'; + +type ElementProps = { + setIsOpen: (open: boolean) => void; +}; + +// TODO: replace placeholder URL with real URLs when avaialble +const KEPLR_DASHBOARD_URL = 'https://testnet.keplr.app/'; +const HELP_URL = 'https://help.dydx.exchange/en/articles/2921366-how-do-i-create-an-account-or-sign-up'; + +export const ExternalNavKeplrDialog = ({ setIsOpen }: ElementProps) => { + const stringGetter = useStringGetter(); + const { isTablet } = useBreakpoints(); + + return ( + + + + + {stringGetter({ + key: STRING_KEYS.NAVIGATE_TO_KEPLR, + params: { + STRONG_YES: {stringGetter({ key: STRING_KEYS.YES })}, + }, + })} + + + + + + + + {stringGetter({ + key: STRING_KEYS.LEARN_TO_EXPORT, + params: { + STRONG_NO: {stringGetter({ key: STRING_KEYS.NO })}, + }, + })} + + + + + + + ); +}; + +const Styled: Record = {}; + +Styled.TextToggle = styled.div` + ${layoutMixins.stickyFooter} + color: var(--color-accent); + cursor: pointer; + + margin-top: auto; + + &:hover { + text-decoration: underline; + } +`; + +Styled.Content = styled.div` + ${layoutMixins.stickyArea0} + --stickyArea0-bottomHeight: 2rem; + --stickyArea0-bottomGap: 1rem; + --stickyArea0-totalInsetBottom: 0.5rem; + + ${layoutMixins.flexColumn} + gap: 1rem; +`; + +Styled.Button = styled(Button)` + --button-font: var(--font-base-book); + --button-padding: 0 1.5rem; + + gap: 0; + + justify-content: space-between; +`; + +Styled.IconButton = styled(IconButton)` + color: var(--color-text-0); +`;