-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(llm): 📝 add the receive flow
NeedMemoTagModal
(#7989)
* feat(llm): add the "accent" button type * feat(llm): add `NeedMemoTagModal` * feat(llm): style the modal * chore: update change log * feat(llm): show the memo/tag modal for some coins only * chore(llm): use more adapted components
- Loading branch information
Showing
10 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"live-mobile": minor | ||
"@ledgerhq/native-ui": minor | ||
--- | ||
|
||
Add the receive flow `NeedMemoTagModal` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
apps/ledger-live-mobile/src/screens/ReceiveFunds/NeedMemoTagModal/NeedMemoTagModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { useTheme } from "styled-components/native"; | ||
import React, { useState } from "react"; | ||
import { Linking } from "react-native"; | ||
import { Button, Flex, Icons, Text } from "@ledgerhq/native-ui"; | ||
import { useTranslation } from "react-i18next"; | ||
import Circle from "~/components/Circle"; | ||
import QueuedDrawer from "~/components/QueuedDrawer"; | ||
import { urls } from "~/utils/urls"; | ||
|
||
export function NeedMemoTagModal() { | ||
const { colors } = useTheme(); | ||
const { t } = useTranslation(); | ||
const [isOpen, setIsOpen] = useState(false); | ||
const openModal = () => setIsOpen(true); | ||
const closeModal = () => setIsOpen(false); | ||
|
||
return ( | ||
<> | ||
<Button type="accent" onPress={openModal}> | ||
{t("transfer.receive.memoTag.link")} | ||
</Button> | ||
|
||
<QueuedDrawer isRequestingToBeOpened={isOpen} onClose={closeModal}> | ||
<Flex alignItems="center" mb={7}> | ||
<Circle size={72} bg={colors.opacityDefault.c05}> | ||
<Icons.InformationFill size="L" color="primary.c80" /> | ||
</Circle> | ||
</Flex> | ||
|
||
<Text variant="h4" textAlign="center" mb={6}> | ||
{t("transfer.receive.memoTag.title")} | ||
</Text> | ||
|
||
<Text variant="bodyLineHeight" textAlign="center" color="neutral.c80" mb={8}> | ||
{t("transfer.receive.memoTag.description")} | ||
</Text> | ||
|
||
<Button type="main" size="large" mb={6} onPress={closeModal}> | ||
{t("transfer.receive.memoTag.cta")} | ||
</Button> | ||
|
||
<Button | ||
type="accent" | ||
size="large" | ||
Icon={() => <Icons.ExternalLink size="S" color="primary.c80" />} | ||
onPress={() => Linking.openURL(urls.memoTag)} | ||
> | ||
{t("transfer.receive.memoTag.learnMore")} | ||
</Button> | ||
</QueuedDrawer> | ||
</> | ||
); | ||
} |
1 change: 1 addition & 0 deletions
1
apps/ledger-live-mobile/src/screens/ReceiveFunds/NeedMemoTagModal/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./NeedMemoTagModal"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters