Skip to content

Commit

Permalink
fix: changed styles (#253)
Browse files Browse the repository at this point in the history
* fix: changed styles

* fix: changed styles overlay

* fix: changed styles overlay

* fix: "dev" badges have gone right; spaces around on/off button should be equal; if there is no "dev" badge, title should use all the space

---------

Co-authored-by: Nikita Teremovskiy <[email protected]>
  • Loading branch information
Lisofffa and Ni-2 authored Dec 11, 2023
1 parent 99512d3 commit 410b61d
Show file tree
Hide file tree
Showing 15 changed files with 470 additions and 565 deletions.
41 changes: 19 additions & 22 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.validate": [
"css",
"scss"
],
"[css]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"[scss]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"stylelint.customSyntax": "postcss-scss",
"files.eol": "\n",
"editor.tabSize": 2
}
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.validate": ["css", "scss"],
"[css]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"[scss]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"stylelint.customSyntax": "postcss-scss",
"files.eol": "\n",
"editor.tabSize": 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
margin-bottom: 16px;
padding: 10px 17px;



background: #fff;
border-radius: 10px;
box-shadow: 0 1px 2px rgb(225 225 225 / 20%), 0 -1px 2px rgb(225 225 225 / 20%),
Expand All @@ -23,20 +21,21 @@
display: flex;
flex: 1 1 auto;
flex-direction: column;
justify-content: space-between;

width: 325px;
padding: 0 0 0 13px;
}

.header {
width: 100%;
}

.blockTop {
display: flex;
align-items: center;
width: 100%;
transition: all 0.2s ease;

.blockIcons {
display: flex;
justify-content: space-between;
width: 34px;
margin: 0 57px 0 13px;
}
}

.errorIcon {
Expand All @@ -51,15 +50,8 @@
}

.errorTitle {
.blockIcons {
display: flex;
justify-content: space-between;
width: 3px;
margin: 0 57px 0 13px;
}

h2 {
color: $error!important;
color: $error !important;
}
}

Expand All @@ -69,7 +61,6 @@
width: 277px;
padding: 5px 0 13px;


font-size: 12px;
font-weight: 400;
line-height: 120%;
Expand Down Expand Up @@ -170,8 +161,8 @@
width: 25px;
height: 20px;
margin-left: 10px;
padding: 5px;


font-size: 10px;
font-weight: 500;
line-height: 100%;
Expand All @@ -190,12 +181,22 @@
height: 24px;
}

.loaderOrSwitchContainer {
position: relative;

display: flex;
justify-content: center;

width: 32px;
margin: 0 0 0 17px;
}

.loader {
display: inline-block;
display: block;

width: 20px;
height: 20px;
margin-left: 12px;
margin: 0 6px;

background-image: url('../../assets/svg/loaderSettings.svg');
background-repeat: no-repeat;
Expand All @@ -206,7 +207,6 @@

padding-bottom: 5px;


font-size: 12px;
font-weight: 400;
line-height: 120%;
Expand Down
11 changes: 0 additions & 11 deletions src/contentscript/overlay/root/components/Dapplet/adaptive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,8 @@
width: calc(100% - 50px);
}

.blockIcons {
margin: 0;
}

.blockTop {
display: flex;

.blockIcons {
display: flex;
justify-content: space-between;
width: 34px;
margin: 0 8.5% 0 4.5%;
}
}

.blockText {
Expand Down
11 changes: 4 additions & 7 deletions src/contentscript/overlay/root/components/Dapplet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,12 @@ export const Dapplet: FC<DappletProps> = (props: DappletProps) => {
</span>
) : null}
<DappletTitle isShowDescription={false} title={title}>
{dapplet.sourceRegistry.isDev && <span className={styles.isDev}>dev</span>}
{dapplet.sourceRegistry.isDev ? <div className={styles.isDev}>dev</div> : null}
</DappletTitle>

<div className={cn(styles.blockIcons)}></div>

{!isUnderConstruction && (
<>
<div className={styles.loaderOrSwitchContainer}>
{loadHome ? (
<span className={styles.loader}></span>
<div className={styles.loader}></div>
) : (
<Switch
className={isActive ? 'active-switch' : 'not-active-switch'}
Expand All @@ -129,7 +126,7 @@ export const Dapplet: FC<DappletProps> = (props: DappletProps) => {
}}
/>
)}
</>
</div>
)}
</div>
{error ? <span className={styles.moduleError}>{'Dapplet error'}</span> : null}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@import "../../assets/styles/color.variables";
@import "../../assets/styles/null";
@import "./adaptive";
@import '../../assets/styles/color.variables';
@import '../../assets/styles/null';
@import './adaptive';

.BlockTitleCard {
display: flex;
flex-grow: 1;
align-items: center;
width: 193px;

.titleCard {
font-size: 14px;
Expand Down Expand Up @@ -33,4 +33,3 @@
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ export interface DappletTitleProps {
title: string
isShowDescription?: boolean
children?: ReactChild | ReactNode
className?: any
className?
}
export const DappletTitle: FC<DappletTitleProps> = (props: DappletTitleProps) => {
const { title, children, className } = props

return (
<div className={cn(styles.BlockTitleCard)} data-testid="dapplet-title">
<h2 className={cn(styles.titleCard, className)}>{title}</h2>

<div>
<h2 className={cn(styles.titleCard, className)}>{title}</h2>
</div>
{children}
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
position: relative;
top: -15px;
right: 0;
background: inherit;
}

.noneVisible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
overflow: -moz-scrollbars-none;

height: 100%;
padding: 0 0 5px;

background: $overlay-bg;

-ms-overflow-style: none;
Expand Down Expand Up @@ -114,7 +112,6 @@
.amount {
margin-left: 5px;


font-size: 10px;
font-weight: 700;
line-height: 100%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@import "../../assets/styles/color.variables";
@import "../../assets/styles/null";
@import '../../assets/styles/color.variables';
@import '../../assets/styles/null';

.wrapper {
position: relative;
margin-left: auto;
}

.input {
Expand Down Expand Up @@ -32,7 +33,7 @@
transition: all 0.3s ease 0s;

&::before {
content: "";
content: '';

position: absolute;
top: 50%;
Expand Down
Loading

0 comments on commit 410b61d

Please sign in to comment.