From 37ab04c5966bd8a8d4ccd8d0a78c02da3d6114cd Mon Sep 17 00:00:00 2001 From: Alex <40631201+DrekaaR@users.noreply.github.com> Date: Fri, 14 Apr 2023 15:14:20 +0200 Subject: [PATCH] redo header, icons changed --- package-lock.json | 771 ------------------ package.json | 1 - src/app/App.js | 20 +- src/app/assets/svg/arrow-shevron.svg | 12 + src/app/assets/svg/copy.svg | 6 +- src/app/assets/svg/cross.svg | 2 +- src/app/assets/svg/dots.svg | 8 + src/app/assets/svg/plus.svg | 2 +- src/app/assets/svg/receive-colored.svg | 5 + src/app/assets/svg/receive.svg | 8 +- src/app/assets/svg/send-colored.svg | 5 + src/app/assets/svg/send.svg | 8 +- src/app/components/AppPlug/AppPlug.jsx | 15 + .../components/AppPlug/AppPlug.module.scss | 1 + src/app/components/Header/Header.jsx | 127 +-- src/app/components/Header/Header.module.scss | 178 ++-- .../components/TokensTabs/Assets/Assets.jsx | 26 +- .../components/TokensTabs/History/History.jsx | 14 +- src/app/components/Wallet/Wallet.jsx | 60 +- src/app/components/Wallet/Wallet.module.scss | 41 +- src/app/styles/App.scss | 1 + src/app/styles/_variables.scss | 1 + src/app/styles/reset.scss | 4 +- src/utils/formatters.js | 21 + 24 files changed, 277 insertions(+), 1060 deletions(-) create mode 100644 src/app/assets/svg/arrow-shevron.svg create mode 100644 src/app/assets/svg/dots.svg create mode 100644 src/app/assets/svg/receive-colored.svg create mode 100644 src/app/assets/svg/send-colored.svg create mode 100644 src/app/components/AppPlug/AppPlug.jsx create mode 100644 src/app/components/AppPlug/AppPlug.module.scss create mode 100644 src/utils/formatters.js diff --git a/package-lock.json b/package-lock.json index 309330f..dd9d810 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,6 @@ "@babel/core": "^7.21.4", "@babel/preset-env": "^7.21.4", "@babel/preset-react": "^7.18.6", - "@svgr/webpack": "^7.0.0", "babel-loader": "^9.1.2", "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.3", @@ -3454,343 +3453,6 @@ "string.prototype.matchall": "^4.0.6" } }, - "node_modules/@svgr/babel-plugin-add-jsx-attribute": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-7.0.0.tgz", - "integrity": "sha512-khWbXesWIP9v8HuKCl2NU2HNAyqpSQ/vkIl36Nbn4HIwEYSRWL0H7Gs6idJdha2DkpFDWlsqMELvoCE8lfFY6Q==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-7.0.0.tgz", - "integrity": "sha512-iiZaIvb3H/c7d3TH2HBeK91uI2rMhZNwnsIrvd7ZwGLkFw6mmunOCoVnjdYua662MqGFxlN9xTq4fv9hgR4VXQ==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-7.0.0.tgz", - "integrity": "sha512-sQQmyo+qegBx8DfFc04PFmIO1FP1MHI1/QEpzcIcclo5OAISsOJPW76ZIs0bDyO/DBSJEa/tDa1W26pVtt0FRw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-7.0.0.tgz", - "integrity": "sha512-i6MaAqIZXDOJeikJuzocByBf8zO+meLwfQ/qMHIjCcvpnfvWf82PFvredEZElErB5glQFJa2KVKk8N2xV6tRRA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-dynamic-title": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-7.0.0.tgz", - "integrity": "sha512-BoVSh6ge3SLLpKC0pmmN9DFlqgFy4NxNgdZNLPNJWBUU7TQpDWeBuyVuDW88iXydb5Cv0ReC+ffa5h3VrKfk1w==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-em-dimensions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-7.0.0.tgz", - "integrity": "sha512-tNDcBa+hYn0gO+GkP/AuNKdVtMufVhU9fdzu+vUQsR18RIJ9RWe7h/pSBY338RO08wArntwbDk5WhQBmhf2PaA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-react-native-svg": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-7.0.0.tgz", - "integrity": "sha512-qw54u8ljCJYL2KtBOjI5z7Nzg8LnSvQOP5hPKj77H4VQL4+HdKbAT5pnkkZLmHKYwzsIHSYKXxHouD8zZamCFQ==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-svg-component": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-7.0.0.tgz", - "integrity": "sha512-CcFECkDj98daOg9jE3Bh3uyD9kzevCAnZ+UtzG6+BQG/jOQ2OA3jHnX6iG4G1MCJkUQFnUvEv33NvQfqrb/F3A==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-preset": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-7.0.0.tgz", - "integrity": "sha512-EX/NHeFa30j5UjldQGVQikuuQNHUdGmbh9kEpBKofGUtF0GUPJ4T4rhoYiqDAOmBOxojyot36JIFiDUHUK1ilQ==", - "dev": true, - "dependencies": { - "@svgr/babel-plugin-add-jsx-attribute": "^7.0.0", - "@svgr/babel-plugin-remove-jsx-attribute": "^7.0.0", - "@svgr/babel-plugin-remove-jsx-empty-expression": "^7.0.0", - "@svgr/babel-plugin-replace-jsx-attribute-value": "^7.0.0", - "@svgr/babel-plugin-svg-dynamic-title": "^7.0.0", - "@svgr/babel-plugin-svg-em-dimensions": "^7.0.0", - "@svgr/babel-plugin-transform-react-native-svg": "^7.0.0", - "@svgr/babel-plugin-transform-svg-component": "^7.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/core": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-7.0.0.tgz", - "integrity": "sha512-ztAoxkaKhRVloa3XydohgQQCb0/8x9T63yXovpmHzKMkHO6pkjdsIAWKOS4bE95P/2quVh1NtjSKlMRNzSBffw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "^7.0.0", - "camelcase": "^6.2.0", - "cosmiconfig": "^8.1.3" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/core/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/@svgr/core/node_modules/cosmiconfig": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", - "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", - "dev": true, - "dependencies": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - } - }, - "node_modules/@svgr/core/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@svgr/hast-util-to-babel-ast": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-7.0.0.tgz", - "integrity": "sha512-42Ej9sDDEmsJKjrfQ1PHmiDiHagh/u9AHO9QWbeNx4KmD9yS5d1XHmXUNINfUcykAU+4431Cn+k6Vn5mWBYimQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.21.3", - "entities": "^4.4.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/hast-util-to-babel-ast/node_modules/entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/@svgr/plugin-jsx": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-7.0.0.tgz", - "integrity": "sha512-SWlTpPQmBUtLKxXWgpv8syzqIU8XgFRvyhfkam2So8b3BE0OS0HPe5UfmlJ2KIC+a7dpuuYovPR2WAQuSyMoPw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "^7.0.0", - "@svgr/hast-util-to-babel-ast": "^7.0.0", - "svg-parser": "^2.0.4" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/plugin-svgo": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-7.0.0.tgz", - "integrity": "sha512-263znzlu3qTKj71/ot5G9l2vpL4CW+pr2IexBFIwwB+fRAXE9Xnw2rUFgE6P4+37N9siOuC4lKkgBfUCOLFRKQ==", - "dev": true, - "dependencies": { - "cosmiconfig": "^8.1.3", - "deepmerge": "^4.3.1", - "svgo": "^3.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "*" - } - }, - "node_modules/@svgr/plugin-svgo/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/@svgr/plugin-svgo/node_modules/cosmiconfig": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", - "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", - "dev": true, - "dependencies": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - } - }, - "node_modules/@svgr/plugin-svgo/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@svgr/webpack": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-7.0.0.tgz", - "integrity": "sha512-XWzIhLTr5WYns/cNFXpXrmFy+LFf2xp60VnNUBZCpM1CGTx47FCDuUj2DQjxirMf2L6CP2jTRELK8ef01TecFQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@babel/plugin-transform-react-constant-elements": "^7.21.3", - "@babel/preset-env": "^7.20.2", - "@babel/preset-react": "^7.18.6", - "@babel/preset-typescript": "^7.21.0", - "@svgr/core": "^7.0.0", - "@svgr/plugin-jsx": "^7.0.0", - "@svgr/plugin-svgo": "^7.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, "node_modules/@testing-library/dom": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.2.0.tgz", @@ -16012,143 +15674,6 @@ "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" }, - "node_modules/svgo": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz", - "integrity": "sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ==", - "dev": true, - "dependencies": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^5.1.0", - "css-tree": "^2.2.1", - "csso": "^5.0.5", - "picocolors": "^1.0.0" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/svgo" - } - }, - "node_modules/svgo/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/svgo/node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/svgo/node_modules/css-tree": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", - "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.28", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/svgo/node_modules/csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", - "dev": true, - "dependencies": { - "css-tree": "~2.2.0" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/svgo/node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/svgo/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/svgo/node_modules/domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/svgo/node_modules/entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/svgo/node_modules/mdn-data": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", - "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", - "dev": true - }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -20156,205 +19681,6 @@ "string.prototype.matchall": "^4.0.6" } }, - "@svgr/babel-plugin-add-jsx-attribute": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-7.0.0.tgz", - "integrity": "sha512-khWbXesWIP9v8HuKCl2NU2HNAyqpSQ/vkIl36Nbn4HIwEYSRWL0H7Gs6idJdha2DkpFDWlsqMELvoCE8lfFY6Q==", - "dev": true, - "requires": {} - }, - "@svgr/babel-plugin-remove-jsx-attribute": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-7.0.0.tgz", - "integrity": "sha512-iiZaIvb3H/c7d3TH2HBeK91uI2rMhZNwnsIrvd7ZwGLkFw6mmunOCoVnjdYua662MqGFxlN9xTq4fv9hgR4VXQ==", - "dev": true, - "requires": {} - }, - "@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-7.0.0.tgz", - "integrity": "sha512-sQQmyo+qegBx8DfFc04PFmIO1FP1MHI1/QEpzcIcclo5OAISsOJPW76ZIs0bDyO/DBSJEa/tDa1W26pVtt0FRw==", - "dev": true, - "requires": {} - }, - "@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-7.0.0.tgz", - "integrity": "sha512-i6MaAqIZXDOJeikJuzocByBf8zO+meLwfQ/qMHIjCcvpnfvWf82PFvredEZElErB5glQFJa2KVKk8N2xV6tRRA==", - "dev": true, - "requires": {} - }, - "@svgr/babel-plugin-svg-dynamic-title": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-7.0.0.tgz", - "integrity": "sha512-BoVSh6ge3SLLpKC0pmmN9DFlqgFy4NxNgdZNLPNJWBUU7TQpDWeBuyVuDW88iXydb5Cv0ReC+ffa5h3VrKfk1w==", - "dev": true, - "requires": {} - }, - "@svgr/babel-plugin-svg-em-dimensions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-7.0.0.tgz", - "integrity": "sha512-tNDcBa+hYn0gO+GkP/AuNKdVtMufVhU9fdzu+vUQsR18RIJ9RWe7h/pSBY338RO08wArntwbDk5WhQBmhf2PaA==", - "dev": true, - "requires": {} - }, - "@svgr/babel-plugin-transform-react-native-svg": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-7.0.0.tgz", - "integrity": "sha512-qw54u8ljCJYL2KtBOjI5z7Nzg8LnSvQOP5hPKj77H4VQL4+HdKbAT5pnkkZLmHKYwzsIHSYKXxHouD8zZamCFQ==", - "dev": true, - "requires": {} - }, - "@svgr/babel-plugin-transform-svg-component": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-7.0.0.tgz", - "integrity": "sha512-CcFECkDj98daOg9jE3Bh3uyD9kzevCAnZ+UtzG6+BQG/jOQ2OA3jHnX6iG4G1MCJkUQFnUvEv33NvQfqrb/F3A==", - "dev": true, - "requires": {} - }, - "@svgr/babel-preset": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-7.0.0.tgz", - "integrity": "sha512-EX/NHeFa30j5UjldQGVQikuuQNHUdGmbh9kEpBKofGUtF0GUPJ4T4rhoYiqDAOmBOxojyot36JIFiDUHUK1ilQ==", - "dev": true, - "requires": { - "@svgr/babel-plugin-add-jsx-attribute": "^7.0.0", - "@svgr/babel-plugin-remove-jsx-attribute": "^7.0.0", - "@svgr/babel-plugin-remove-jsx-empty-expression": "^7.0.0", - "@svgr/babel-plugin-replace-jsx-attribute-value": "^7.0.0", - "@svgr/babel-plugin-svg-dynamic-title": "^7.0.0", - "@svgr/babel-plugin-svg-em-dimensions": "^7.0.0", - "@svgr/babel-plugin-transform-react-native-svg": "^7.0.0", - "@svgr/babel-plugin-transform-svg-component": "^7.0.0" - } - }, - "@svgr/core": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-7.0.0.tgz", - "integrity": "sha512-ztAoxkaKhRVloa3XydohgQQCb0/8x9T63yXovpmHzKMkHO6pkjdsIAWKOS4bE95P/2quVh1NtjSKlMRNzSBffw==", - "dev": true, - "requires": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "^7.0.0", - "camelcase": "^6.2.0", - "cosmiconfig": "^8.1.3" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "cosmiconfig": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", - "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", - "dev": true, - "requires": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - } - } - }, - "@svgr/hast-util-to-babel-ast": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-7.0.0.tgz", - "integrity": "sha512-42Ej9sDDEmsJKjrfQ1PHmiDiHagh/u9AHO9QWbeNx4KmD9yS5d1XHmXUNINfUcykAU+4431Cn+k6Vn5mWBYimQ==", - "dev": true, - "requires": { - "@babel/types": "^7.21.3", - "entities": "^4.4.0" - }, - "dependencies": { - "entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true - } - } - }, - "@svgr/plugin-jsx": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-7.0.0.tgz", - "integrity": "sha512-SWlTpPQmBUtLKxXWgpv8syzqIU8XgFRvyhfkam2So8b3BE0OS0HPe5UfmlJ2KIC+a7dpuuYovPR2WAQuSyMoPw==", - "dev": true, - "requires": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "^7.0.0", - "@svgr/hast-util-to-babel-ast": "^7.0.0", - "svg-parser": "^2.0.4" - } - }, - "@svgr/plugin-svgo": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-7.0.0.tgz", - "integrity": "sha512-263znzlu3qTKj71/ot5G9l2vpL4CW+pr2IexBFIwwB+fRAXE9Xnw2rUFgE6P4+37N9siOuC4lKkgBfUCOLFRKQ==", - "dev": true, - "requires": { - "cosmiconfig": "^8.1.3", - "deepmerge": "^4.3.1", - "svgo": "^3.0.2" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "cosmiconfig": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", - "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", - "dev": true, - "requires": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - } - } - }, - "@svgr/webpack": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-7.0.0.tgz", - "integrity": "sha512-XWzIhLTr5WYns/cNFXpXrmFy+LFf2xp60VnNUBZCpM1CGTx47FCDuUj2DQjxirMf2L6CP2jTRELK8ef01TecFQ==", - "dev": true, - "requires": { - "@babel/core": "^7.21.3", - "@babel/plugin-transform-react-constant-elements": "^7.21.3", - "@babel/preset-env": "^7.20.2", - "@babel/preset-react": "^7.18.6", - "@babel/preset-typescript": "^7.21.0", - "@svgr/core": "^7.0.0", - "@svgr/plugin-jsx": "^7.0.0", - "@svgr/plugin-svgo": "^7.0.0" - } - }, "@testing-library/dom": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.2.0.tgz", @@ -29225,103 +28551,6 @@ "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" }, - "svgo": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz", - "integrity": "sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ==", - "dev": true, - "requires": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^5.1.0", - "css-tree": "^2.2.1", - "csso": "^5.0.5", - "picocolors": "^1.0.0" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - }, - "css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - } - }, - "css-tree": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", - "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", - "dev": true, - "requires": { - "mdn-data": "2.0.28", - "source-map-js": "^1.0.1" - } - }, - "csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", - "dev": true, - "requires": { - "css-tree": "~2.2.0" - } - }, - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - } - }, - "entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true - }, - "mdn-data": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", - "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", - "dev": true - } - } - }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", diff --git a/package.json b/package.json index d7a680f..e38da9e 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "@babel/core": "^7.21.4", "@babel/preset-env": "^7.21.4", "@babel/preset-react": "^7.18.6", - "@svgr/webpack": "^7.0.0", "babel-loader": "^9.1.2", "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.3", diff --git a/src/app/App.js b/src/app/App.js index a93df82..a0fdef4 100644 --- a/src/app/App.js +++ b/src/app/App.js @@ -1,16 +1,26 @@ +import { useState } from "react"; +import AppPlug from "./components/AppPlug/AppPlug"; import Header from "./components/Header/Header"; import TokensTabs from "./components/TokensTabs/TokensTabs"; import Wallet from "./components/Wallet/Wallet"; import "./styles/App.scss"; function App() { + const [isConnected, setIsConnected] = useState(false); + return (
-
-
- - -
+ {isConnected ? ( + + ) : ( + <> +
+
+ + +
+ + )}
); } diff --git a/src/app/assets/svg/arrow-shevron.svg b/src/app/assets/svg/arrow-shevron.svg new file mode 100644 index 0000000..98cedfc --- /dev/null +++ b/src/app/assets/svg/arrow-shevron.svg @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/src/app/assets/svg/copy.svg b/src/app/assets/svg/copy.svg index b33bf83..872e155 100644 --- a/src/app/assets/svg/copy.svg +++ b/src/app/assets/svg/copy.svg @@ -1,8 +1,8 @@ - + + fill="white"/> + fill="white"/> diff --git a/src/app/assets/svg/cross.svg b/src/app/assets/svg/cross.svg index b07a08a..29d0f3a 100644 --- a/src/app/assets/svg/cross.svg +++ b/src/app/assets/svg/cross.svg @@ -1,4 +1,4 @@ - + + + + + diff --git a/src/app/assets/svg/plus.svg b/src/app/assets/svg/plus.svg index 825ee16..fd36686 100644 --- a/src/app/assets/svg/plus.svg +++ b/src/app/assets/svg/plus.svg @@ -1,4 +1,4 @@ - + + + diff --git a/src/app/assets/svg/receive.svg b/src/app/assets/svg/receive.svg index ab69d6d..e4c21be 100644 --- a/src/app/assets/svg/receive.svg +++ b/src/app/assets/svg/receive.svg @@ -1,11 +1,11 @@ - + + fill="white"/> + fill="white"/> + fill="white"/> diff --git a/src/app/assets/svg/send-colored.svg b/src/app/assets/svg/send-colored.svg new file mode 100644 index 0000000..5ba2c8f --- /dev/null +++ b/src/app/assets/svg/send-colored.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/app/assets/svg/send.svg b/src/app/assets/svg/send.svg index d2a7b00..b58285e 100644 --- a/src/app/assets/svg/send.svg +++ b/src/app/assets/svg/send.svg @@ -1,11 +1,11 @@ - + + fill="white"/> + fill="white"/> + fill="white"/> diff --git a/src/app/components/AppPlug/AppPlug.jsx b/src/app/components/AppPlug/AppPlug.jsx new file mode 100644 index 0000000..a7836a7 --- /dev/null +++ b/src/app/components/AppPlug/AppPlug.jsx @@ -0,0 +1,15 @@ +import React from 'react'; +import logo from "../../assets/svg/logo.svg" +import s from "./AppPlug.module.scss" + +const AppPlug = () => { + return ( +
+
+ zano logo +
+
+ ); +}; + +export default AppPlug; \ No newline at end of file diff --git a/src/app/components/AppPlug/AppPlug.module.scss b/src/app/components/AppPlug/AppPlug.module.scss new file mode 100644 index 0000000..8da1101 --- /dev/null +++ b/src/app/components/AppPlug/AppPlug.module.scss @@ -0,0 +1 @@ +@use "sass:math"; \ No newline at end of file diff --git a/src/app/components/Header/Header.jsx b/src/app/components/Header/Header.jsx index bb10de5..03a64ac 100644 --- a/src/app/components/Header/Header.jsx +++ b/src/app/components/Header/Header.jsx @@ -1,78 +1,85 @@ -import BurgerIcon from "../../assets/svg/burger.svg"; -import CrossIcon from "../../assets/svg/cross.svg"; -import GearIcon from "../../assets/svg/gear.svg"; -import InfoIcon from "../../assets/svg/info.svg"; -import LockIcon from "../../assets/svg/lock.svg"; -import Logo from "../../assets/svg/logo.svg"; -import PlusIcon from "../../assets/svg/plus.svg"; -import UsersIcon from "../../assets/svg/users.svg"; -import MyButton from "../../components/UI/MyButton/MyButton"; import React, { useState } from "react"; +import Formatters from "../../../utils/formatters"; +import arrowIcon from "../../assets/svg/arrow-shevron.svg"; import s from "./Header.module.scss"; -const Header = () => { - const [menuVisible, setMenuVisible] = useState(false); +const wallet = { + address: "ZxDCjt6KQaR7DCjt6KQaR7DCjt6KQaR7", + label: "@alias", +}; - const toggleBurgerMenu = () => { - if (menuVisible) { - setMenuVisible(false); +const walletsMap = [ + { + address: "ZxDCjt6KQaR7DCjt6KQaR7DCjt6KQaR7", + label: null, + balance: 120, + }, + { + address: "ZxDCjt6KQaR213DCjt6KQaR7DCjt6KQaR7", + label: "@alias", + balance: 2415, + }, + { + address: "ZxDCjt623R7DCjt6KQaR7DCjt6KQaR7", + label: null, + balance: 52.23, + }, +]; + +const isConnected = true; + +const Header = () => { + const [dropdownOpen, setDropdownOpen] = useState(false); + + const toggleDropdown = () => { + if (dropdownOpen) { + setDropdownOpen(false); + document.querySelector(".App").style.overflow = "auto"; } else { - setMenuVisible(true); + setDropdownOpen(true); + document.querySelector(".App").style.overflow = "hidden"; } }; return (
- - +
+ {isConnected ? "online" : "offline"} + +
-
Wallet Name 1
- - + {dropdownOpen && ( +
+
e.stopPropagation()} className={s.dropdownList}> + {walletsMap.map((wallet) => ( + + ))} +
+
+ )}
); }; export default Header; - -// Components -const BurgerMenu = ({ menuVisible, toggleBurgerMenu }) => { - return ( - <> - {menuVisible && ( -
-
e.stopPropagation()}> -
- Logo - -
-
- - PlusIcon Add Wallet - - - UsersIcon Contacts - - - GearIcon Settings - -
- - LockIcon Lock Zano - -
-
- )} - - ); -}; diff --git a/src/app/components/Header/Header.module.scss b/src/app/components/Header/Header.module.scss index dc4c16f..e0ac130 100644 --- a/src/app/components/Header/Header.module.scss +++ b/src/app/components/Header/Header.module.scss @@ -10,134 +10,96 @@ height: 56px; background: #0f2055; border-bottom: 1px solid rgba(255, 255, 255, 0.1); - display: grid; - grid-template-columns: auto 1fr auto; + display: flex; + justify-content: space-between; align-items: center; column-gap: 30px; - padding: 0 15px; + padding: 0 16px; text-align: center; } -.headerInfo { - color: $blueColor; +// ========================================================= +.headerStatus { display: flex; - justify-content: center; align-items: center; + column-gap: 5px; + font-size: 14px; + text-align: right; + span { + border-radius: 50%; + width: 10px; + height: 10px; + flex: 0 0 10px; + } } -.lockButton { - display: flex; - column-gap: 6px; - justify-content: center; - align-items: center; - border: 2px solid #1f8feb; - border-radius: 8px; - color: #ffffff; - height: 47px; +// ========================================================= +.dropdown { + position: absolute; width: 100%; - transition: background-color 0.2s ease 0s; - svg { - font-size: 15px; - } - &:hover { - background-color: rgba(255, 255, 255, 0.05); - } -} - -// ========================================================= -.burger { - display: flex; - justify-content: center; - align-items: center; - color: $blueColor; -} - -// ========================================================= -.menu { - position: fixed; - z-index: 100; - top: 0; left: 0; - height: 100%; - width: 100%; - &::after { - content: ""; - position: absolute; - z-index: -1; - width: calc(100% + 290px); - height: 100%; - top: 0; - left: 0; - background: rgba(0, 0, 0, 0.46); - animation: show-menu-bg 0.2s ease; - } - @keyframes show-menu-bg { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } - } + top: calc(100% + 1px); + height: calc($appHeight - 56px); + background-color: rgba(0, 0, 0, 0.46); } -.menuBody { - padding: 18px 16px; - width: 290px; - height: 100%; - z-index: 2; - display: flex; - flex-direction: column; - background: #11316b; - animation: show-burger-menu 0.2s ease; - @keyframes show-burger-menu { - 0% { - transform: translate(-100%, 0); - } - 100% { - transform: translate(0px, 0px); - } - } -} - -.menuHeader { +.dropdownButton { display: flex; align-items: center; - justify-content: space-between; - font-size: 22px; - color: #1f8feb; - margin-bottom: 35px; -} - -.menuLinks { - flex: 1 1 auto; -} - -.menuLink { - display: flex; column-gap: 8px; - align-items: center; - text-align: left; - height: 50px; font-weight: 600; - opacity: 0.7; - transition: opacity 0.2s ease 0s; - font-size: 20px; - svg { - width: 24px; - flex: 0 0 24px; + line-height: math.div(21, 18); + color: #fff; + font-size: 18px; +} + +.dropdownList { + background-color: #0F2055; + max-height: 300px; + overflow-y: scroll; + -ms-overflow-style: none; + scrollbar-width: none; + &::-webkit-scrollbar { + display: block; + width: 5px; } - &:nth-child(1) { - svg { - font-size: 18px; - } + &::-webkit-scrollbar-thumb { + background-color: rgba(255, 255, 255, 0.3); + border-radius: 5px; } - &:nth-child(2) { - svg { - font-size: 22px; - } +} + +.dropdownTitle { + padding: 20px 16px; + display: flex; + align-items: center; + column-gap: 30px; + justify-content: space-between; + width: 100%; + + text-align: left; + font-size: 18px; + font-weight: 600; + line-height: math.div(21, 18); + span { + margin-top: 6px; + display: block; + font-size: 14px; + line-height: math.div(17, 14); + opacity: 0.5; + } + &:not(:last-child) { + border-bottom: 1px solid rgba(255, 255, 255, 0.1); } &:hover { - opacity: 1; + background: rgba(255, 255, 255, 0.05); } } + +.dropdownBalance { + font-weight: 600; + font-size: 18px; + line-height: math.div(21, 18); + text-align: right; + color: #1F8FEB; +} \ No newline at end of file diff --git a/src/app/components/TokensTabs/Assets/Assets.jsx b/src/app/components/TokensTabs/Assets/Assets.jsx index e88530a..a35ce20 100644 --- a/src/app/components/TokensTabs/Assets/Assets.jsx +++ b/src/app/components/TokensTabs/Assets/Assets.jsx @@ -1,38 +1,38 @@ -import CrossIcon from "../../../assets/svg/cross.svg"; -import PlusIcon from "../../../assets/svg/plus.svg"; -import BitcoinIcon from "../../../assets/tokens-svg/bitcoin.svg"; -import CustomTokenIcon from "../../../assets/tokens-svg/custom-token.svg"; -import EthIcon from "../../../assets/tokens-svg/eth.svg"; -import ZanoIcon from "../../../assets/tokens-svg/zano.svg"; -import MyButton from "../../../components/UI/MyButton/MyButton"; import React from "react"; +import crossIcon from "../../../assets/svg/cross.svg"; +import plusIcon from "../../../assets/svg/plus.svg"; +import bitcoinIcon from "../../../assets/tokens-svg/bitcoin.svg"; +import customTokenIcon from "../../../assets/tokens-svg/custom-token.svg"; +import ethIcon from "../../../assets/tokens-svg/eth.svg"; +import zanoIcon from "../../../assets/tokens-svg/zano.svg"; +import MyButton from "../../../components/UI/MyButton/MyButton"; import s from "./Assets.module.scss"; const assetsMap = [ { name: "ZANO", - icon: ZanoIcon, + icon: ZanoIcon, balance: 120, ticker: "ZANO", value: 128.96, }, { name: "Wrapped Bitcoin", - icon: BitcoinIcon, + icon: bitcoin icon, balance: 0.212, ticker: "WBTC", value: 4096.96, }, { name: "Wrapped Ethereum", - icon: EthIcon, + icon: EthIcon, balance: 2.1, ticker: "WETH", value: 3020.12, }, { name: "Custom Asset", - icon: CustomTokenIcon, + icon: CustomTokenIcon, balance: 15.52, ticker: "TSDS", value: 3020.12, @@ -49,7 +49,7 @@ const Assets = () => { {assetsMap.map((asset) => (
))} - PlusIcon Add Custom Token + PlusIcon Add Custom Token ); diff --git a/src/app/components/TokensTabs/History/History.jsx b/src/app/components/TokensTabs/History/History.jsx index 4ae74d5..5e89d77 100644 --- a/src/app/components/TokensTabs/History/History.jsx +++ b/src/app/components/TokensTabs/History/History.jsx @@ -1,6 +1,7 @@ -import ArrowIcon from "../../../assets/svg/arrow-square.svg"; -import LoadingIcon from "../../../assets/svg/loading.svg"; import React from "react"; +import LoadingIcon from "../../../assets/svg/loading.svg"; +import receiveIcon from "../../../assets/svg/receive-colored.svg"; +import sendIcon from "../../../assets/svg/send-colored.svg"; import s from "./History.module.scss"; const historyMap = [ @@ -24,10 +25,7 @@ const History = () => { return (
{historyMap.map((historyItem, index) => { - const iconClasses = - historyItem.type === "send" - ? s.historyIcon - : [s.historyIcon, s.receiveVariant].join(" "); + const icon = historyItem.type === "send" ? sendIcon : receiveIcon; return (
$1224.15 -4.6% @@ -60,17 +48,17 @@ const Wallet = () => { onClick={() => copyToClipboard(walletAddress)} className={`${s.copyButton} round-button`} > - CopyIcon + SendIcon
@@ -83,17 +71,3 @@ const Wallet = () => { export default Wallet; -// Components -const StatusModal = ({ walletConnected, getWalletStatusColor }) => ( -
-
- {walletConnected ? "Connected" : "Disconnected"} -
-
-
website.com
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit -
-
-
-); diff --git a/src/app/components/Wallet/Wallet.module.scss b/src/app/components/Wallet/Wallet.module.scss index 6922fee..46224ae 100644 --- a/src/app/components/Wallet/Wallet.module.scss +++ b/src/app/components/Wallet/Wallet.module.scss @@ -7,6 +7,10 @@ } } +.dotsButton { + transform: translate(25%, 0); +} + // ========================================================= .clipboardModal { position: absolute; @@ -106,41 +110,6 @@ } } -// Status modal -.status { - position: absolute; - z-index: 2; - min-width: 180px; - top: calc(100% + 4px); - right: 0; - background: #11316b; - border-radius: 8px; - font-size: 14px; - line-height: math.div(17, 14); - box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1); - - transition: all 0.2s ease 0s; - transition-property: opacity, visibility; - opacity: 0; - visibility: hidden; - .statusTitle { - display: block; - padding: 10px 12px 8px 12px; - border-bottom: 1px solid rgba(255, 255, 255, 0.2); - } - .statusContent { - padding: 8px 12px 12px 12px; - } - .statusAddress { - font-weight: 500; - margin-bottom: 5px; - } - .statusText { - font-weight: 300; - color: rgba(255, 255, 255, 0.8); - } -} - // ========================================================= .actionsWallet { display: grid; @@ -161,7 +130,7 @@ font-size: 21px; line-height: math.div(25, 21); transition: background-color 0.2s ease 0s; - svg { + img { flex: 0 0 20px; } &:hover { diff --git a/src/app/styles/App.scss b/src/app/styles/App.scss index ae06812..c7039ac 100644 --- a/src/app/styles/App.scss +++ b/src/app/styles/App.scss @@ -10,6 +10,7 @@ overflow-y: auto; background-color: #0C0C3A; padding-top: 72px; + } .container { diff --git a/src/app/styles/_variables.scss b/src/app/styles/_variables.scss index b3b1c2c..3559920 100644 --- a/src/app/styles/_variables.scss +++ b/src/app/styles/_variables.scss @@ -3,3 +3,4 @@ $fontSize: 19px; $mainColor: #ffffff; $blueColor: #1f8feb; $appWidth: 360px; +$appHeight: 600px; diff --git a/src/app/styles/reset.scss b/src/app/styles/reset.scss index 253bde3..e4065ed 100644 --- a/src/app/styles/reset.scss +++ b/src/app/styles/reset.scss @@ -1,8 +1,8 @@ @import "_variables"; ::-webkit-scrollbar { - display: none; - scrollbar-width: none; + display: none; + scrollbar-width: none; } * { diff --git a/src/utils/formatters.js b/src/utils/formatters.js new file mode 100644 index 0000000..4a84df2 --- /dev/null +++ b/src/utils/formatters.js @@ -0,0 +1,21 @@ +export default class Formatters { + static walletAddress(str) { + if (str.length > 20) { + if (window.innerWidth > 768) { + return ( + str.substring(0, 6) + + "..." + + str.substring(str.length - 6, str.length) + ); + } else { + return ( + str.substring(0, 5) + + "..." + + str.substring(str.length - 5, str.length) + ); + } + } + return str; + } +} +