-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from agrim-deriv/Agrim/APICreateToken
Agrim/create_api_token desk + resp
- Loading branch information
Showing
29 changed files
with
15,993 additions
and
9,898 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
208 changes: 77 additions & 131 deletions
208
src/components/AccountSwitcher/account_switcher.module.scss
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 |
---|---|---|
@@ -1,157 +1,103 @@ | ||
@use 'src/styles/utility' as *; | ||
|
||
.accountSwitcher { | ||
.customSelectItem { | ||
display: flex; | ||
position: relative; | ||
height: 100%; | ||
width: 100%; | ||
align-items: center; | ||
font-size: rem(1.4); | ||
transition: background-color 0.2s; | ||
border-radius: 3px; | ||
padding: rem(1); | ||
height: rem(5.2); | ||
line-height: rem(2); | ||
|
||
@media (max-width: 768px) { | ||
font-size: rem(1.2); | ||
position: unset; | ||
} | ||
|
||
button.demo { | ||
color: var(--demo-account); | ||
&:hover { | ||
cursor: pointer; | ||
} | ||
|
||
&.active > button { | ||
&::after { | ||
transform: rotate(-180deg); | ||
} | ||
img { | ||
width: rem(3.2); | ||
height: rem(3.2); | ||
} | ||
|
||
.logoutButtonContainer { | ||
.accountInfoContainer { | ||
display: flex; | ||
font-family: var(--ubuntu-font-family); | ||
justify-content: flex-end; | ||
border-top: 2px solid var(--ifm-color-emphasis-200); | ||
padding: rem(1) rem(2.5); | ||
height: rem(5.2); | ||
|
||
button.logoutButton { | ||
display: flex; | ||
gap: rem(1); | ||
justify-content: center; | ||
align-items: center; | ||
width: fit-content; | ||
font-size: rem(1.4); | ||
cursor: pointer; | ||
&::after { | ||
content: ''; | ||
display: inline-block; | ||
background-image: url('/img/logout.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
background-size: rem(1.5); | ||
width: rem(1.5); | ||
height: rem(1.5); | ||
} | ||
flex-direction: column; | ||
margin-left: rem(1); | ||
line-height: rem(2); | ||
.accountType { | ||
font-size: rem(1.6); | ||
} | ||
} | ||
} | ||
|
||
> .accountSwitcherButton { | ||
.logoutButtonContainer { | ||
display: flex; | ||
justify-content: flex-end; | ||
border-top: 2px solid var(--ifm-color-emphasis-200); | ||
padding: 1rem 2.5rem; | ||
height: 5.2rem; | ||
|
||
.logoutButton { | ||
display: flex; | ||
cursor: pointer; | ||
font-weight: bold; | ||
color: var(--text-profit-success); | ||
padding: 0 rem(0.8); | ||
gap: rem(0.8); | ||
height: 100%; | ||
gap: 1rem; | ||
justify-content: center; | ||
align-items: center; | ||
&:hover { | ||
background-color: var(--ifm-color-emphasis-100); | ||
transition: background-color 0.2s; | ||
} | ||
|
||
font-size: 1.4rem; | ||
cursor: pointer; | ||
&::after { | ||
content: ''; | ||
background-image: url('/img/arrow_down_bold.svg'); | ||
display: inline-block; | ||
background-image: url('/img/logout.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
background-size: rem(1.5); | ||
width: rem(1.5); | ||
height: rem(1.5); | ||
transform: rotate(0deg); | ||
transition: transform .2s ease-in-out; | ||
background-size: 1.5rem; | ||
width: 1.5rem; | ||
height: 1.5rem; | ||
} | ||
} | ||
} | ||
|
||
.currencyIconContainer { | ||
width: rem(2.4); | ||
height: rem(2.4); | ||
.accountSwitcherButton { | ||
display: flex; | ||
cursor: pointer; | ||
font-weight: bold; | ||
color: var(--text-profit-success); | ||
padding: 0 0.8rem; | ||
gap: 0.8rem; | ||
height: 100%; | ||
align-items: center; | ||
&:hover { | ||
background-color: var(--ifm-color-emphasis-100); | ||
transition: background-color 0.2s; | ||
} | ||
|
||
.accountDropdownContainer { | ||
display: flex; | ||
position: absolute; | ||
background-color: var(--colors-greyLight100); | ||
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.05), 0px 16px 20px rgba(0, 0, 0, 0.05); | ||
border-bottom-left-radius: 4px; | ||
border-bottom-right-radius: 4px; | ||
gap: rem(0.8); | ||
width: rem(32); | ||
right: 0; | ||
top: 100%; | ||
flex-direction: column; | ||
> div:not(:last-child) { | ||
margin: 0 rem(0.8); | ||
} | ||
> div:nth-child(2) { | ||
background-color: var(--ifm-color-emphasis-200); | ||
align-items: center; | ||
font-size: rem(1.4); | ||
transition: background-color 0.2s; | ||
border-radius: 3px; | ||
padding: rem(1); | ||
> div { | ||
line-height: rem(2); | ||
span { | ||
&:nth-child(1) { | ||
font-size: rem(1.4); | ||
font-weight: bold; | ||
} | ||
&:nth-child(2) { | ||
font-size: rem(1); | ||
color: var(--ifm-color-emphasis-600); | ||
} | ||
} | ||
} | ||
img { | ||
width: rem(3.2); | ||
height: rem(3.2); | ||
} | ||
} | ||
&::after { | ||
content: ''; | ||
background-image: url('/img/arrow_down_bold.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
background-size: 1.5rem; | ||
width: 1.5rem; | ||
height: 1.5rem; | ||
transform: rotate(0deg); | ||
transition: transform 0.2s ease-in-out; | ||
} | ||
} | ||
|
||
@media (max-width: 768px) { | ||
// no other way of overwriting the code from the original component | ||
// important will only be used here in the scope of this component (navbar) | ||
right: 0 !important; | ||
left: 0 !important; | ||
width: 100% !important; | ||
transform: unset !important; | ||
} | ||
.currencyIconContainer { | ||
width: 2.4rem; | ||
height: 2.4rem; | ||
} | ||
|
||
.dropdownHeader { | ||
display: flex; | ||
padding: rem(0.5) rem(1.5); | ||
justify-content: space-between; | ||
align-items: center; | ||
.closeDropdown { | ||
width: rem(2); | ||
height: rem(2); | ||
border-radius: 100%; | ||
padding: rem(0.5); | ||
background-image: url('/img/arrow_up.svg'); | ||
background-size: rem(2); | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: var(--ifm-color-emphasis-100); | ||
transition: background-color 0.2s; | ||
} | ||
} | ||
} | ||
.dropdownMenu { | ||
position: absolute; | ||
top: 100%; | ||
left: 0; | ||
z-index: 1000; | ||
background-color: white; | ||
border: 1px solid #ccc; | ||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); | ||
display: none; | ||
&.active { | ||
display: block; | ||
} | ||
} |
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
Oops, something went wrong.