Skip to content

Commit daa8d82

Browse files
committed
Migrate scss layouts to RootPage component
1 parent 3158d37 commit daa8d82

File tree

12 files changed

+26
-48
lines changed

12 files changed

+26
-48
lines changed

client/common/Button.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const displays = {
2020
// general global styles
2121
const StyledButton = styled.button`
2222
&&& {
23+
font-weight: bold;
2324
display: flex;
2425
justify-content: center;
2526
align-items: center;

client/components/Dropdown.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ const DropdownWrapper = styled.ul`
3434
}
3535
3636
& li:hover {
37-
background-color: ${prop('Button.hover.background')};
38-
color: ${prop('Button.hover.foreground')};
37+
background-color: ${prop('Button.primary.hover.background')};
38+
color: ${prop('Button.primary.hover.foreground')};
3939
4040
* {
41-
color: ${prop('Button.hover.foreground')};
41+
color: ${prop('Button.primary.hover.foreground')};
4242
}
4343
}
4444

client/components/RootPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { prop } from '../theme';
33

44
const RootPage = styled.div`
55
height: 100%;
6-
overflow: auto;
6+
flex-wrap: wrap;
77
display: flex;
88
flex-direction: column;
99
color: ${prop('primaryTextColor')};

client/components/mobile/FloatingNav.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const FloatingContainer = styled.div`
1616
width: ${remSize(32)};
1717
}
1818
svg > path {
19-
fill: ${prop('Button.default.background')} !important;
19+
fill: ${prop('Button.primary.default.background')} !important;
2020
}
2121
`;
2222

client/components/mobile/MobileScreen.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import styled from 'styled-components';
4-
import { remSize } from '../../theme';
4+
import { remSize, prop } from '../../theme';
55

66
const ScreenWrapper = styled.div`
77
.toast {
@@ -14,13 +14,19 @@ const ScreenWrapper = styled.div`
1414
min-width: unset;
1515
bottom: ${remSize(64)};
1616
}
17+
${({ fullscreen }) =>
18+
fullscreen &&
19+
`
20+
display: flex;
21+
width: 100%;
22+
height: 100%;
23+
flex-flow: column;
24+
background-color: ${prop('backgroundColor')}
25+
`}
1726
`;
1827

1928
const Screen = ({ children, fullscreen, slimheader }) => (
20-
<ScreenWrapper
21-
className={fullscreen && 'fullscreen-preview'}
22-
slimheader={slimheader}
23-
>
29+
<ScreenWrapper fullscreen={fullscreen} slimheader={slimheader}>
2430
{children}
2531
</ScreenWrapper>
2632
);

client/modules/IDE/pages/FullView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
MessageTypes
1313
} from '../../../utils/dispatcher';
1414
import useInterval from '../hooks/useInterval';
15+
import RootPage from '../../../components/RootPage';
1516

1617
function FullView(props) {
1718
const dispatch = useDispatch();
@@ -45,7 +46,7 @@ function FullView(props) {
4546
};
4647
}, []);
4748
return (
48-
<div className="fullscreen-preview">
49+
<RootPage style={{ flexWrap: 'initial' }}>
4950
<Helmet>
5051
<title>{project.name}</title>
5152
</Helmet>
@@ -61,7 +62,7 @@ function FullView(props) {
6162
<main className="preview-frame-holder">
6263
<PreviewFrame fullView />
6364
</main>
64-
</div>
65+
</RootPage>
6566
);
6667
}
6768

client/modules/IDE/pages/IDEView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import AddToCollectionList from '../components/AddToCollectionList';
3535
import Feedback from '../components/Feedback';
3636
import { CollectionSearchbar } from '../components/Searchbar';
3737
import { getIsUserOwner } from '../selectors/users';
38+
import RootPage from '../../../components/RootPage';
3839

3940
function getTitle(props) {
4041
const { id } = props.project;
@@ -250,7 +251,7 @@ class IDEView extends React.Component {
250251

251252
render() {
252253
return (
253-
<div className="ide">
254+
<RootPage>
254255
<Helmet>
255256
<title>{getTitle(this.props)}</title>
256257
</Helmet>
@@ -451,7 +452,7 @@ class IDEView extends React.Component {
451452
/>
452453
</Overlay>
453454
)}
454-
</div>
455+
</RootPage>
455456
);
456457
}
457458
}

client/modules/User/pages/DashboardView.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import AssetList from '../../IDE/components/AssetList';
1111
import AssetSize from '../../IDE/components/AssetSize';
1212
import CollectionList from '../../IDE/components/CollectionList';
1313
import SketchList from '../../IDE/components/SketchList';
14+
import RootPage from '../../../components/RootPage';
1415
import * as ProjectActions from '../../IDE/actions/project';
1516
import {
1617
CollectionSearchbar,
@@ -133,7 +134,7 @@ class DashboardView extends React.Component {
133134
const actions = this.renderActionButton(currentTab, username, this.props.t);
134135

135136
return (
136-
<div className="dashboard">
137+
<RootPage>
137138
<Nav layout="dashboard" />
138139

139140
<main className="dashboard-header">
@@ -165,7 +166,7 @@ class DashboardView extends React.Component {
165166
<CollectionCreate />
166167
</Overlay>
167168
)}
168-
</div>
169+
</RootPage>
169170
);
170171
}
171172
}

client/styles/layout/_dashboard.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
.dashboard {
2-
display: flex;
3-
flex-direction: column;
4-
flex-wrap: wrap;
5-
@include themify() {
6-
color: getThemifyVariable('primary-text-color');
7-
background-color: getThemifyVariable('background-color');
8-
}
9-
height: 100%;
10-
}
11-
121
.dashboard-content {
132
display: flex;
143
flex-direction: column;

client/styles/layout/_fullscreen.scss

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)