diff --git a/package.json b/package.json index 621e595f..150d298b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "workspaces": [ "packages/**" ], - "prettier": "@stacks/prettier-config", "scripts": { "build": "lerna run build", "build:connect": "lerna run build --scope @stacks/connect", diff --git a/packages/connect-ui/.prettierrc.js b/packages/connect-ui/.prettierrc.js new file mode 100644 index 00000000..b5ab0454 --- /dev/null +++ b/packages/connect-ui/.prettierrc.js @@ -0,0 +1,4 @@ +module.exports = { + ...require('@stacks/prettier-config'), + plugins: ['prettier-plugin-tailwindcss'], +}; diff --git a/packages/connect-ui/package.json b/packages/connect-ui/package.json index 63183ecd..8c511d90 100644 --- a/packages/connect-ui/package.json +++ b/packages/connect-ui/package.json @@ -2,7 +2,6 @@ "name": "@stacks/connect-ui", "version": "6.1.2", "license": "MIT", - "prettier": "@stacks/prettier-config", "scripts": { "build": "stencil build --docs", "dev": "stencil build --dev --watch", @@ -19,9 +18,12 @@ "devDependencies": { "@stencil/sass": "^1.5.2", "@types/node": "^14.6.0", + "prettier": "^3.1.0", + "prettier-plugin-tailwindcss": "^0.5.7", "puppeteer": "^9.0.0", "stencil-tailwind-plugin": "^1.8.0", - "tailwindcss": "^3.3.5" + "tailwindcss": "^3.3.5", + "tailwindcss-animate": "^1.0.7" }, "publishConfig": { "access": "public" diff --git a/packages/connect-ui/src/components/modal/modal.scss b/packages/connect-ui/src/components/modal/modal.scss index 0acd63c8..fbb1fd2e 100644 --- a/packages/connect-ui/src/components/modal/modal.scss +++ b/packages/connect-ui/src/components/modal/modal.scss @@ -1,144 +1,17 @@ -@import 'browser-not-supported'; -@import 'hiro-wallet-download'; - -@mixin mobile { - @media (max-width: 640px) { - @content; - } -} - :host { all: initial; } .modal-container { - display: flex; - flex-direction: column; - background-color: rgba(0, 0, 0, 0.48); - width: 100%; - height: 100%; - position: fixed; - top: 0px; - left: 0px; - justify-content: center; + color: #74777D; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; - z-index: 8999; - overflow-y: scroll; } .modal-body { - width: 486px; - max-width: 100%; - max-height: calc(100% - 48px); - background: white; - margin-left: auto; - margin-right: auto; - border-radius: 12px; - padding: 20px 24px 20px; - box-sizing: border-box; - overflow-y: scroll; -ms-overflow-style: none; scrollbar-width: none; &::-webkit-scrollbar { display: none; } - - @include mobile { - max-height: 100%; - } -} - -.modal-header { - display: flex; - flex-direction: column; -} - -.modal-content { - display: flex; - flex-direction: column; -} - -.button { - width: 100%; - max-width: 139px; - box-sizing: border-box; - border-radius: 8px; - font-size: 14px; - font-weight: 500; - line-height: 20px; - background-color: #5546ff; - color: #ffffff; - min-height: 48px; - min-width: 126px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - -webkit-transition: all 250ms; - transition: all 250ms; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - white-space: nowrap; - outline: none; - border: none; - cursor: pointer; -} - -.link { - color: #5546ff; - font-size: 14px; - line-height: 20px; - cursor: pointer; - margin-top: 4px; -} - -.modal-subheading { - font-size: 16px; - font-weight: 600; - line-height: 19px; - color: #000000; -} - -.modal-wallet-card { - display: flex; - align-items: flex-start; - background: white; - border: 2px solid #f4f4f6; - border-radius: 16px; - margin-top: 12px; - padding: 24px 10px 24px 20px; -} - -.wallet-container { - display: flex; - flex-direction: column; - - @include mobile { - flex-direction: column-reverse; - } -} - -.modal-wallet-text { - font-size: 14px; - font-weight: 400; - line-height: 20px; - margin-top: 4px; - color: #74777d; - - a { - color: #5546ff; - text-decoration: none; - } - - @include mobile { - font-size: 13px; - } -} - -.modal-wallet-card-content { - display: flex; - flex-direction: column; - padding-left: 14px; } diff --git a/packages/connect-ui/src/components/modal/modal.tsx b/packages/connect-ui/src/components/modal/modal.tsx index 48c9420e..207be7a6 100644 --- a/packages/connect-ui/src/components/modal/modal.tsx +++ b/packages/connect-ui/src/components/modal/modal.tsx @@ -74,109 +74,136 @@ export class Modal { p => this.installedProviders.findIndex(i => i.id === p.id) === -1 // keep providers NOT already in installed list ); + const hasInstalled = this.installedProviders.length > 0; + const hasMore = notInstalledProviders.length > 0; + return ( -