140 lines
2.6 KiB
SCSS
140 lines
2.6 KiB
SCSS
@import 'common/sass/variables';
|
|
@import 'common/sass/mixins';
|
|
|
|
$menu-max-width: 540px;
|
|
$menu-padding: 10px;
|
|
$menu-triangle-size: 14px;
|
|
$menu-offset: 40px;
|
|
$option-width: ($menu-max-width - $menu-padding * 2) / 3;
|
|
$option-width-main: ($menu-max-width - $menu-padding * 2) / 2;
|
|
$option-width-small: $option-width-main;
|
|
$option-width-main-small: 100%;
|
|
|
|
.SwapDropdown {
|
|
position: relative;
|
|
margin-left: $space-xs;
|
|
|
|
&-button {
|
|
height: 3rem;
|
|
padding-left: $space;
|
|
padding-right: $space;
|
|
|
|
&-logo {
|
|
height: 1.4rem;
|
|
margin: -.2rem .3rem 0 -.2rem;
|
|
width: auto;
|
|
}
|
|
|
|
&-label {
|
|
padding-right: .75rem;
|
|
|
|
&:after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
right: .75rem;
|
|
// transform: translateY(-50%);
|
|
@include triangle(8px, $text-color, down);
|
|
}
|
|
}
|
|
}
|
|
|
|
&-menu {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: -$menu-offset;
|
|
z-index: $zindex-popover;
|
|
|
|
&-content {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
flex-direction: row;
|
|
width: calc(100vw - 30px);
|
|
max-width: $menu-max-width;
|
|
padding: $menu-padding;
|
|
background: #FFF;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
border-radius: 4px;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
&-triangle {
|
|
position: absolute;
|
|
top: -($menu-triangle-size / 2);
|
|
right: $menu-offset + 40px;
|
|
width: $menu-triangle-size;
|
|
height: $menu-triangle-size;
|
|
background: #FFF;
|
|
box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
|
|
transform: rotate(45deg);
|
|
}
|
|
}
|
|
}
|
|
|
|
.SwapOption {
|
|
@include reset-button;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
width: 100%;
|
|
max-width: $option-width;
|
|
padding: $space-sm $space-md;
|
|
text-align: left;
|
|
background: rgba($brand-info, 0);
|
|
color: $text-color;
|
|
transition: $transition;
|
|
|
|
@media (max-width: $screen-sm) {
|
|
width: 50%;
|
|
max-width: none;
|
|
}
|
|
|
|
&:hover {
|
|
color: #FFF;
|
|
background: rgba($brand-info, 0.9);
|
|
}
|
|
|
|
&-top {
|
|
display: flex;
|
|
flex-direction: row;
|
|
margin-bottom: $space-xs;
|
|
}
|
|
|
|
&-logo {
|
|
height: 1.2rem;
|
|
width: auto;
|
|
margin-right: $space-xs;
|
|
|
|
.is-main > & {
|
|
height: 2.6rem;
|
|
margin-right: $space-md;
|
|
}
|
|
}
|
|
|
|
&-ticker {
|
|
}
|
|
|
|
&-name {
|
|
font-weight: 300;
|
|
}
|
|
|
|
&.is-main {
|
|
flex-direction: row;
|
|
justify-content: center;
|
|
max-width: $option-width-main;
|
|
padding: $space $space-md;
|
|
font-size: 1rem;
|
|
|
|
@media (max-width: $screen-sm) {
|
|
width: 50%;
|
|
max-width: none;
|
|
}
|
|
}
|
|
|
|
&.is-disabled {
|
|
filter: grayscale(1);
|
|
opacity: 0.3;
|
|
pointer-events: none;
|
|
}
|
|
}
|