Skip to content

Commit 3d1e9eb

Browse files
update bg theme & alt body layout to 6:4
1 parent 69ceaaf commit 3d1e9eb

20 files changed

Lines changed: 51 additions & 166 deletions

File tree

editor/components/canvas/controller-zoom-control.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import styled from "@emotion/styled";
33
import RefreshSharpIcon from "@material-ui/icons/RefreshSharp";
4+
import { colors } from "theme";
45

56
export function ZoomControl({
67
scale,
@@ -87,8 +88,8 @@ const Controls = styled.div`
8788
box-sizing: border-box;
8889
border-radius: 4px;
8990
padding: 4px;
90-
background-color: #252526;
91-
box-shadow: #25252650 0px 0px 0px 16px inset;
91+
background-color: ${colors.color_editor_bg_on_dark};
92+
box-shadow: ${colors.color_editor_bg_on_dark} 0px 0px 0px 16px inset;
9293
`;
9394

9495
const ControlsContainer = styled.div`

editor/components/editor/editor-appbar/editor-appbar-fragment-for-canvas.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import styled from "@emotion/styled";
33
import { useEditorState } from "core/states";
4+
import { colors } from "theme";
45

56
export function AppbarFragmentForCanvas() {
67
const [state] = useEditorState();
@@ -19,7 +20,7 @@ const RootWrapperAppbarFragmentForCanvas = styled.div`
1920
align-items: center;
2021
gap: 10px;
2122
align-self: stretch;
22-
background-color: rgba(37, 37, 38, 1);
23+
background-color: ${colors.color_editor_bg_on_dark};
2324
box-sizing: border-box;
2425
padding: 10px 24px;
2526
`;

editor/components/editor/editor-appbar/editor-appbar-fragment-for-code-editor.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const RootWrapperAppbarFragmentForCodeEditor = styled.div`
3434
flex: 1;
3535
gap: 10px;
3636
align-self: stretch;
37-
background-color: rgba(30, 30, 30, 1);
3837
box-sizing: border-box;
3938
padding-bottom: 14px;
4039
padding-top: 14px;

editor/components/editor/editor-appbar/editor-appbar-fragment-for-sidebar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22
import styled from "@emotion/styled";
33
import { ArrowBack } from "@material-ui/icons";
44
import { useRouter } from "next/router";
5+
import { colors } from "theme";
56

67
export function AppbarFragmentForSidebar() {
78
const router = useRouter();
@@ -35,7 +36,7 @@ const RootWrapperAppbarFragmentForSidebar = styled.div`
3536
gap: 10px;
3637
width: 200px;
3738
align-self: stretch;
38-
background-color: rgba(37, 37, 38, 1);
39+
background-color: ${colors.color_editor_bg_on_dark};
3940
box-sizing: border-box;
4041
padding: 14px 16px;
4142
`;

editor/components/home/cards/base-home-scene-card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from "react";
22
import styled from "@emotion/styled";
3+
import { colors } from "theme";
34

45
export function BaseHomeSceneCard({
56
label,
@@ -45,7 +46,7 @@ const RootWrapperBaseHomeSceneCard = styled.div`
4546
gap: 10px;
4647
border: solid 1px rgba(72, 72, 72, 1);
4748
border-radius: 2px;
48-
background-color: rgba(37, 37, 38, 1);
49+
background-color: ${colors.color_editor_bg_on_dark};
4950
box-sizing: border-box;
5051
5152
:hover {

editor/layouts/panel/workspace-content-panel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ import React from "react";
99
export function WorkspaceContentPanel({
1010
children,
1111
disableBorder = true,
12+
flex = 1,
1213
backgroundColor = "none",
1314
}: {
1415
backgroundColor?: string;
1516
children: JSX.Element;
1617
disableBorder?: boolean;
18+
flex?: number;
1719
}) {
1820
return (
1921
<WorkspaceCPanel
22+
flex={flex}
2023
backgroundColor={backgroundColor}
2124
disableBorder={disableBorder}
2225
>
@@ -26,13 +29,14 @@ export function WorkspaceContentPanel({
2629
}
2730

2831
const WorkspaceCPanel = styled.div<{
32+
flex?: number;
2933
backgroundColor: string;
3034
disableBorder: boolean;
3135
}>`
3236
border: ${(p) => (p.disableBorder ? "none" : "solid #d2d2d2")};
3337
background-color: ${(p) => p.backgroundColor};
3438
border-width: 1px;
3539
align-self: stretch;
36-
flex: 1;
40+
flex: ${(p) => p.flex};
3741
overflow: auto;
3842
`;

editor/pages/_app.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import React from "react";
22
import { Global, css } from "@emotion/react";
33
import Head from "next/head";
44
import { EditorThemeProvider } from "@editor-ui/theme";
5+
import { colors } from "theme";
56

67
function GlobalCss() {
78
return (
89
<Global
910
styles={css`
1011
html {
11-
background-color: #252526;
12+
background-color: ${colors.color_editor_bg_on_dark};
1213
touch-action: none;
1314
}
1415
@@ -58,7 +59,7 @@ function HeadInjection() {
5859
/>
5960
<meta
6061
name="theme-color"
61-
content="#1e1e1e"
62+
content={colors.color_editor_bg_on_dark}
6263
media="(prefers-color-scheme: dark)"
6364
/>
6465

editor/pages/components/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
HomeSidebar,
99
} from "components/home";
1010
import { WorkspaceRepository } from "repository";
11+
import { colors } from "theme";
1112

1213
export default function ComponentsPage() {
1314
const repository = new WorkspaceRepository();
@@ -21,7 +22,7 @@ export default function ComponentsPage() {
2122
return (
2223
<>
2324
<DefaultEditorWorkspaceLayout
24-
backgroundColor={"rgba(37, 37, 38, 1)"}
25+
backgroundColor={colors.color_editor_bg_on_dark}
2526
leftbar={<HomeSidebar />}
2627
>
2728
<div style={{ padding: 80 }}>

editor/pages/embed/vscode/grida-explorer-preview/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import styled from "@emotion/styled";
33
import { useRouter } from "next/router";
44
import VanillaPreview from "@code-editor/vanilla-preview";
55
import { ProgressBar } from "@modulz/design-system";
6+
import { colors } from "theme";
67

78
export default function VSCodeEmbedGridaExplorerPreview() {
89
const router = useRouter(); // use router only for loading initial params.
@@ -86,7 +87,7 @@ const EmptyStateContainer = styled.div`
8687
align-items: center;
8788
flex: none;
8889
gap: 10px;
89-
background-color: rgba(37, 37, 38, 1);
90+
background-color: ${colors.color_editor_bg_on_dark};
9091
box-sizing: border-box;
9192
`;
9293

editor/pages/files/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from "components/home";
99
import { WorkspaceRepository } from "repository";
1010
import { FileResponseRecord } from "store/fimga-file-store/figma-file-store";
11+
import { colors } from "theme";
1112

1213
export default function FilesPage() {
1314
const repository = new WorkspaceRepository();
@@ -19,7 +20,7 @@ export default function FilesPage() {
1920
return (
2021
<>
2122
<DefaultEditorWorkspaceLayout
22-
backgroundColor={"rgba(37, 37, 38, 1)"}
23+
backgroundColor={colors.color_editor_bg_on_dark}
2324
leftbar={<HomeSidebar />}
2425
>
2526
<div style={{ padding: 80 }}>

0 commit comments

Comments
 (0)