Skip to content

Commit

Permalink
fix: ui improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulyadav-57 committed Oct 23, 2024
1 parent 9eae118 commit 198e74b
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 31 deletions.
3 changes: 3 additions & 0 deletions src/components/project/NewProject/NewProject.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
background: #000;
z-index: -1;
border-radius: inherit;
[data-theme='light'] & {
background: var(--primary);
}
}
}
}
Expand Down
17 changes: 15 additions & 2 deletions src/components/workspace/ABIUi/ABIUi.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
[data-theme='light'] & {
background: #d6d6d6;
}
&:hover {
color: var(--text-color);
background-color: var(--grey--50);
}
}
}
&.Setter {
Expand All @@ -79,13 +83,22 @@
background: var(--primary);
box-shadow: none;
z-index: 0;

&:hover {
border-color: transparent;
color: #fff;
color: var(--text-color);

&:before {
background: #101010;
[data-theme='light'] & {
background: var(--btn-primary-hover);
}
}
}
& span,
&:hover span [data-theme='light'] & {
color: #fff;
}
&:disabled {
opacity: 0.5;
color: var(--text-color);
Expand All @@ -102,7 +115,7 @@
z-index: -1;
border-radius: inherit;
[data-theme='light'] & {
background: #fff;
background: var(--primary);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@
text-align: center;
}
}
.themeSwitch {
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 1rem auto;
align-items: center;
border-radius: 50%;
height: 3rem;
width: 3rem;

> svg {
width: 1.4rem;
height: 1.4rem;
}
}
.clone {
font-size: 1.3rem;
}
Expand All @@ -69,24 +84,7 @@
margin: 0 !important;
}
}
.themeSwitch {
display: flex;
margin: 0 auto 1rem auto;
align-items: center;
&[class*='ant-switch-checked'] {
background-color: #4e4e4e;
}
[class*='ant-switch-inner-checked'] {
display: inline-flex !important;
align-items: center;
height: 100%;
}
[class*='ant-switch-inner-unchecked'] {
height: 90%;
display: flex !important;
align-items: center;
}
}

.resetAmount {
display: flex;
align-items: center;
Expand Down
17 changes: 10 additions & 7 deletions src/components/workspace/WorkspaceSidebar/WorkspaceSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,18 @@ const WorkspaceSidebar: FC<Props> = ({
</div>
</Popover>
<Tooltip title="Switch Theme" placement="right">
<Switch
className={s.themeSwitch}
checkedChildren={<AppIcon name="Moon" />}
unCheckedChildren={<AppIcon name="Sun" />}
defaultChecked={themeContext?.theme == 'dark'}
onChange={() => {
<div
className={`${s.themeSwitch} ${s.action} ${s.isActive}`}
onClick={() => {
themeContext?.toggleTheme();
}}
/>
>
{themeContext?.theme == 'dark' ? (
<AppIcon name="Moon" />
) : (
<AppIcon name="Sun" />
)}
</div>
</Tooltip>
</div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
--text-color: #000;
--bg-color: #f7f7f7;
--black-500: #dcdada;
--btn-disabled: rgba(0, 0, 0, 0.1);
--menu-bg: rgba(255, 255, 255, 0.6);
--sidebar-bg: #e8e8e8;
--color-light: #454444;
Expand All @@ -54,10 +55,11 @@
rgba(255, 255, 255, 0.6) 100%
);
--modal-bg: linear-gradient(
0deg,
rgba(255, 255, 255, 0.5) 0%,
rgba(255, 255, 255, 0.5) 100%
);
0deg,
rgba(255, 255, 255, 0.5) 0%,
rgba(255, 255, 255, 0.5) 100%
),
#eaeaea;
}

html {
Expand Down

0 comments on commit 198e74b

Please sign in to comment.