From 033b776c0ed59d59a6ca7161b64daa5f76b2e461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Regadas?= Date: Mon, 20 Mar 2023 11:55:53 +0000 Subject: [PATCH] [MMI] adds the jwt-url-form component (#18198) * MMI adds the Jwt dropdown * MMI prettier * review fixes * adds the component * adds tests and story file * lint & prettier fix * prettier fix * prettier and clean up * prettier and clean up --- app/_locales/en/messages.json | 11 +- .../__snapshots__/jwt-url-form.test.js.snap | 46 +++++++ .../institutional/jwt-url-form/index.js | 1 + .../jwt-url-form/jwt-url-form.js | 128 ++++++++++++++++++ .../jwt-url-form/jwt-url-form.scss | 58 ++++++++ .../jwt-url-form/jwt-url-form.stories.js | 24 ++++ .../jwt-url-form/jwt-url-form.test.js | 77 +++++++++++ 7 files changed, 344 insertions(+), 1 deletion(-) create mode 100644 ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap create mode 100644 ui/components/institutional/jwt-url-form/index.js create mode 100644 ui/components/institutional/jwt-url-form/jwt-url-form.js create mode 100644 ui/components/institutional/jwt-url-form/jwt-url-form.scss create mode 100644 ui/components/institutional/jwt-url-form/jwt-url-form.stories.js create mode 100644 ui/components/institutional/jwt-url-form/jwt-url-form.test.js diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 733e0edc8..eefe50cb5 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -257,6 +257,9 @@ "message": "This network connection relies on third parties. This connection may be less reliable or enable third-parties to track activity. $1", "description": "$1 is Learn more link" }, + "addNewToken": { + "message": "Add new token" + }, "addSuggestedTokens": { "message": "Add suggested tokens" }, @@ -1370,6 +1373,9 @@ "message": "File import not working? Click here!", "description": "Helps user import their account from a JSON file" }, + "fileTooBig": { + "message": "The dropped file is too big." + }, "flaskSnapSettingsCardButtonCta": { "message": "See details", "description": "Call to action a user can take to see more information about the snap that is installed" @@ -3331,6 +3337,9 @@ "selectHdPath": { "message": "Select HD path" }, + "selectJWT": { + "message": "Select token" + }, "selectNFTPrivacyPreference": { "message": "Turn on NFT detection in Settings" }, @@ -4003,7 +4012,7 @@ "message": "Select a quote" }, "swapSelectAToken": { - "message": "Select a token" + "message": "Select token" }, "swapSelectQuotePopoverDescription": { "message": "Below are all the quotes gathered from multiple liquidity sources." diff --git a/ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap b/ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap new file mode 100644 index 000000000..2d9c15b48 --- /dev/null +++ b/ui/components/institutional/jwt-url-form/__snapshots__/jwt-url-form.test.js.snap @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`JwtUrlForm shows JWT text area when no jwt token exists 1`] = ` +
+
+
+
+

+ input text +

+