diff --git a/.gitignore b/.gitignore index 3b207c053..4f0f23a07 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,6 @@ yarn-error.log* .idea -.vscode/settings.json +.vscode +.vscode* .vercel diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index d7df89c9c..000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 8c167a488..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true -} diff --git a/src/components/Footer/Footer.module.scss b/src/components/Footer/Footer.module.scss index 124589953..1395489cc 100644 --- a/src/components/Footer/Footer.module.scss +++ b/src/components/Footer/Footer.module.scss @@ -10,14 +10,12 @@ .FooterBody { display: flex; flex-direction: column; - padding: rem(3); } .FooterSection { display: flex; flex-direction: row; gap: rem(9.6); - max-width: 1264px; } .FooterLogo { @@ -197,7 +195,7 @@ .FooterBody { display: flex; width: 100%; - padding: rem(3.2) rem(1.6); + padding-block: 32px; } p { @@ -221,7 +219,7 @@ @media (max-width: 600px) { .FooterBody { - padding: rem(3.2) rem(1.6); + padding-block: 32px; } .PaddedButton { display: flex; diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 9288a1a65..720a343aa 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -111,6 +111,7 @@ const Footer = () => { ]; return ( +
@@ -291,6 +292,7 @@ const Footer = () => {
+
); }; diff --git a/src/components/CustomTabs/__tests__/custom-tabs.test.tsx b/src/components/custom-tabs/__tests__/custom-tabs.test.tsx similarity index 100% rename from src/components/CustomTabs/__tests__/custom-tabs.test.tsx rename to src/components/custom-tabs/__tests__/custom-tabs.test.tsx diff --git a/src/components/CustomTabs/custom-tabs.scss b/src/components/custom-tabs/custom-tabs.scss similarity index 77% rename from src/components/CustomTabs/custom-tabs.scss rename to src/components/custom-tabs/custom-tabs.scss index 69bec75bc..7f6bf4f72 100644 --- a/src/components/CustomTabs/custom-tabs.scss +++ b/src/components/custom-tabs/custom-tabs.scss @@ -20,8 +20,8 @@ align-items: center; } &__item { - padding: 10px 18px; - min-width: 17rem; + padding: 12px 18px; + min-width: 320px; cursor: pointer; @media screen and (max-width: 500px) { @@ -38,19 +38,7 @@ margin-block: 32px; } } - - &_content { - width: 1310px; - margin: auto; - - @media screen and (max-width: 1023px) { - width: 100%; - } - } -} - -.tabs_content { - @media screen and (max-width: 1023px) { + &__content { width: 100%; } } diff --git a/src/components/CustomTabs/index.tsx b/src/components/custom-tabs/custom-tabs.tsx similarity index 91% rename from src/components/CustomTabs/index.tsx rename to src/components/custom-tabs/custom-tabs.tsx index 74a9c214b..39ee6ab60 100644 --- a/src/components/CustomTabs/index.tsx +++ b/src/components/custom-tabs/custom-tabs.tsx @@ -25,7 +25,7 @@ const CustomTabs: React.FC<{ ))} -
{tabs[activeTab].content}
+
{tabs[activeTab].content}
); }; diff --git a/src/components/custom-tabs/index.ts b/src/components/custom-tabs/index.ts new file mode 100644 index 000000000..a2f9c23d5 --- /dev/null +++ b/src/components/custom-tabs/index.ts @@ -0,0 +1,3 @@ +import CustomTabs from './custom-tabs'; + +export default CustomTabs; diff --git a/src/features/Apiexplorer/Dropdown/Dropdown.module.scss b/src/features/Apiexplorer/Dropdown/Dropdown.module.scss index 3d11f600f..22073d9cf 100644 --- a/src/features/Apiexplorer/Dropdown/Dropdown.module.scss +++ b/src/features/Apiexplorer/Dropdown/Dropdown.module.scss @@ -3,7 +3,6 @@ user-select: none; border: 1px solid var(--ifm-color-gray-400); position: relative; - overflow-x: hidden; .arrow { background-size: rem(2.2); @@ -21,24 +20,21 @@ } .dropdownBtn { - padding: rem(0.5) rem(0.5); + padding: 4px 8px; background: var(--ifm-color-white); color: var(--ifm-color-black); display: flex; align-items: center; - cursor: pointer; justify-content: space-between; font-size: rem(1.6); + &:hover { + cursor: pointer; + } } .dropdownContent { position: relative; - top: 110%; - padding-top: rem(1); - left: 0; background: var(--ifm-color-white); color: var(--ifm-color-black); - overflow: auto; - overflow-x: hidden; } } diff --git a/src/features/Apiexplorer/Dropdown/DropdownList/DropdownList.module.scss b/src/features/Apiexplorer/Dropdown/DropdownList/DropdownList.module.scss index 59542cd32..ab6b82f7f 100644 --- a/src/features/Apiexplorer/Dropdown/DropdownList/DropdownList.module.scss +++ b/src/features/Apiexplorer/Dropdown/DropdownList/DropdownList.module.scss @@ -1,15 +1,32 @@ @use 'src/styles/utility' as *; + +.dropdownWrapper { + position: absolute; + top: 0; + left: -1px; + width: calc(100% + 2px); + height: 322px; + z-index: 1000; + background-color: var(--ifm-color-white); + border: 1px solid var(--ifm-color-gray-300); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); +} + +.dropdownInputWrapper { + padding: 16px; +} + .dropdownSearch { - padding: rem(0.4); - margin: rem(1); - width: 97%; + padding: 4px; + width: 100%; box-sizing: border-box; border: 1px solid var(--ifm-color-gray-300); } .dropdownList { - max-height: rem(70); + --overlay-height: 260px; + height: var(--overlay-height); overflow: auto; .dropdownSelect { padding: 0; diff --git a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx index bcc1c89d5..aa6fd4be0 100644 --- a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx +++ b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx @@ -44,16 +44,18 @@ const DropdownList: React.FC = ({ const filteredOptions = filterOptions(playground_requests, searchResults); return ( -
- { - setSearchResults(event.target.value); - }} - /> +
+
+ { + setSearchResults(event.target.value); + }} + /> +
diff --git a/src/features/Apiexplorer/index.tsx b/src/features/Apiexplorer/index.tsx index 9717bda49..e7d53993f 100644 --- a/src/features/Apiexplorer/index.tsx +++ b/src/features/Apiexplorer/index.tsx @@ -20,63 +20,65 @@ export default function ApiExplorerFeatures() { const has_info = Object.keys(request_info).length === 0; return ( <> -
- -
-
- - API Explorer - -
-
-
-
- - -
- {!has_info && ( -
-
- -
-
- -
+
+
+ +
+
+ + API Explorer + +
+
+
+
+ +
- )} + {!has_info && ( +
+
+ +
+
+ +
+
+ )} +
-
+
); } diff --git a/src/features/Apiexplorer/styles.module.scss b/src/features/Apiexplorer/styles.module.scss index 16d5cc71d..1a7fdc551 100644 --- a/src/features/Apiexplorer/styles.module.scss +++ b/src/features/Apiexplorer/styles.module.scss @@ -1,4 +1,5 @@ @use 'src/styles/utility' as *; +@use 'src/styles/mixins' as *; .schemaContainer { position: relative; @@ -10,7 +11,6 @@ justify-content: space-between; width: 100%; margin-top: rem(4); - min-height: 89vh; .heading { text-align: center; @@ -20,11 +20,6 @@ display: flex; color: var(--ifm-color-emphasis-1000); - @media screen and (min-width: 1440px) { - width: 1310px; - margin: auto; - } - .playground { display: flex; justify-content: center; @@ -38,7 +33,7 @@ justify-content: center; width: 95%; gap: rem(2); - @media screen and (max-width: 1024px) { + @include tablet { flex-direction: column; align-items: center; } @@ -51,7 +46,7 @@ display: flex; flex-direction: column; width: 50%; - @media screen and (max-width: 1024px) { + @include tablet { width: 100%; } } @@ -62,7 +57,7 @@ gap: rem(2); margin-bottom: rem(1); width: 50%; - @media screen and (max-width: 1024px) { + @include tablet { width: 100%; } } diff --git a/src/features/Auth/Login/Login.module.scss b/src/features/Login/Login.module.scss similarity index 93% rename from src/features/Auth/Login/Login.module.scss rename to src/features/Login/Login.module.scss index 389e8af5f..d10e41a10 100644 --- a/src/features/Auth/Login/Login.module.scss +++ b/src/features/Login/Login.module.scss @@ -27,3 +27,7 @@ .footer { width: 100%; } + +.action { + margin-top: rem(1.5); +} diff --git a/src/features/Auth/Login/Login.tsx b/src/features/Login/Login.tsx similarity index 85% rename from src/features/Auth/Login/Login.tsx rename to src/features/Login/Login.tsx index ca5f379b6..ff119d368 100644 --- a/src/features/Auth/Login/Login.tsx +++ b/src/features/Login/Login.tsx @@ -25,9 +25,11 @@ export const Login = () => { Log in to your Deriv account to get the API token and start using our API. - +
+ +