Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP_SEPERATION]/Rupato/BOT-1952/Fix--dashboard-content-menu-dialogs #22

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<title>Deriv Bot</title>
</head>
<body class="body">
<div id="modal_root" class="modal-root"></div>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
Expand Down
1 change: 1 addition & 0 deletions public/assets/icons/IcCross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/assets/icons/IcMenuDots.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/assets/icons/IcUserGuide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion src/app/app.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.bot {
--bot-content-height: calc(100vh - 140px);
--bot-content-width: calc(100vw - 366px); //run-panel is open by default
--bot-content-width: calc(100vw - 366px);
--drawer-content-height: calc(100vh - 394px);
--drawer-content-height-no-stat: calc(100vh - 233px);
--drawer-scroll-height: calc(100vh - 365px);
Expand All @@ -15,3 +15,24 @@
background: var(--general-section-1);
}
}

.modal-root {
position: absolute;
top: 0;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.72);
right: 0;
opacity: 0;
z-index: -1;
}
.modal-root:not(:empty) {
display: flex;
opacity: 1;
z-index: 10;
}
289 changes: 289 additions & 0 deletions src/components/shared_ui/button/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
:root {
--button-primary-default: #ff444f;
--text-colored-background: #fff;
--button-primary-hover: #eb3e48;
--button-secondary-default: #6e6e6e;
}

.dc-btn {
vertical-align: middle;
align-items: center;
justify-content: center;
touch-action: manipulation;
cursor: pointer;
white-space: nowrap;
padding: 0 1.6rem;
display: inline-flex;
border: 0;
height: 3.2rem;
border-radius: 4px;
transition: all 0.2s cubic-bezier(0.65, 0.05, 0.36, 1);
outline: 0;
position: relative;
text-decoration: none;
user-select: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent;
/*
* Text will be transformed to sentence case in JS
* text-transform is declared in .dc-btn instead of .dc-btn__text
* to ensure consistency (even for children) as per styleguide
*/
text-transform: none !important;

&__toggle {
height: auto;
padding: 0.8rem 2.5rem;
}
&__text,
&__icon {
display: flex;
pointer-events: none;
}
&__icon {
@include typeface(--paragraph-center-bold-black, unset);
color: var(--text-general);
padding-right: 0.8rem;
pointer-events: none;

&--circle {
padding-right: 0;
}
}
&:not([disabled]):hover {
text-decoration: none;
}
&__rounded {
border-radius: 24px;
}
&--plus {
width: 2.4rem;
height: 2.4rem !important;
border: 1px solid var(--border-hover) !important;
padding: 0 !important;
background: inherit;
background-repeat: no-repeat;
background-position: center;
}
&--circle {
height: 3.2rem;
width: 3.2rem !important;
border-radius: 50%;
}
&--circular {
border-radius: 100px;
}
&--transparent {
background: transparent;
}
&--primary {
background: var(--button-primary-default);
color: var(--text-colored-background);

&:hover:not([disabled]) {
background: var(--button-primary-hover);
}
&:active:not([disabled]) {
background: var(--button-primary-default);
}
&:disabled,
&[disabled] {
opacity: 0.32;
cursor: not-allowed !important;
}
.dc-btn__text,
.dc-btn__icon {
color: var(--text-colored-background);
}

&__light {
background: var(--button-primary-light-default);

&:hover:not([disabled]) {
background: var(--button-primary-light-hover);
}
&:active:not([disabled]) {
background: var(--button-primary-light-default);
}
&:disabled,
&[disabled] {
opacity: 0.32;
cursor: not-allowed !important;
}
.dc-btn__text,
.dc-btn__icon {
color: var(--brand-red-coral);
}
}
}
&--secondary {
background: transparent;
border: 1px solid var(--button-secondary-default);

&:hover:not([disabled]) {
background: var(--button-secondary-hover);
}
&:active:not([disabled]) {
border: 1px solid var(--button-secondary-default);
}
&:disabled,
&[disabled] {
opacity: 0.32;
cursor: not-allowed !important;
}
.dc-btn__text,
.dc-btn__icon {
color: var(--text-prominent);
}
}
&--tertiary {
background: var(--button-tertiary-default);

&:hover:not([disabled]) {
background: var(--button-tertiary-hover);
}
&:active:not([disabled]) {
background: var(--button-tertiary-default);
}
.dc-btn__text,
.dc-btn__icon {
color: var(--brand-red-coral);
}
&:disabled,
&[disabled] {
opacity: 0.32;
cursor: not-allowed !important;
}
}
&--alternate {
background: var(--button-tertiary-default);
border: 2px solid var(--button-primary-default);

&:hover:not([disabled]) {
background: var(--button-primary-default);

.dc-btn__text {
color: var(--text-colored-background);
}
}

.dc-btn__text,
.dc-btn__icon {
color: var(--brand-red-coral);
}
}
/* TODO: confirm this button with designer are we still using this? */
&--green {
background: var(--status-success);

&:hover:not([disabled]) {
background: var(--transparent-success);
}
&:active:not([disabled]) {
background: var(--status-success);
}
.dc-btn__text,
.dc-btn__icon {
color: var(--text-colored-background);
}
}
&--black {
background: var(--button-get-started-bg);
&:hover:not([disabled]) {
opacity: 0.7;
}
&:active:not([disabled]) {
opacity: 0.7;
}

.dc-btn__text,
.dc-btn__icon {
color: var(--general-main-1);
}
}
&__small {
height: 2.4rem;
min-width: 4.8rem;
border-width: 1px;

.dc-btn__text {
font-size: 1.2rem;
}
}
&__medium {
height: 3.2rem;
min-width: 5.6rem;
border-width: 1px;

.dc-btn__text {
font-size: 1.4rem;
}
}
&__large {
height: 4rem;
min-width: 6.4rem;
border-width: 2px;

.dc-btn__text {
font-size: 1.4rem;
}
}
&__wide {
width: 100%;
height: 4rem;
}
&__effect:focus:not(:active):after {
content: '';
position: absolute;
top: -0.1em;
left: -0.1em;
bottom: -0.1em;
right: -0.1em;
border-radius: inherit;
border: 0 solid var(--brand-secondary);
opacity: 0.4;
animation: button-effect 0.4s;
animation-fill-mode: forwards;
display: block;
}
&__group {
white-space: nowrap;

.dc-btn + .dc-btn {
margin-left: 8px;
}
}
&__button-group {
border-radius: 0 4px 4px 0;
}
/* TODO: confirm this button with designer are we still using this? */
/* postcss-bem-linter: ignore */
.initial-loader--btn {
background-color: unset;

/* postcss-bem-linter: ignore */
.initial-loader__barspinner--rect {
background-color: var(--text-colored-background);
}
/* postcss-bem-linter: ignore */
.barspinner {
margin: 0.6rem 4px 0 -4px;

/* postcss-bem-linter: ignore */
&__rect {
height: 35%;
}
}
}
}

@keyframes button-effect {
to {
opacity: 0;
top: -0.6em;
left: -0.6em;
bottom: -0.6em;
right: -0.6em;
border-width: 6px;
}
}
Loading
Loading