Skip to content

Commit 5547591

Browse files
committed
Merge branch 'develop' of https://github.com/processing/p5.js-web-editor into dewanshmobile/mobilenav
2 parents 1088417 + 0bd139b commit 5547591

File tree

8 files changed

+249
-300
lines changed

8 files changed

+249
-300
lines changed

client/modules/IDE/components/AddToCollectionList.jsx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Helmet } from 'react-helmet';
44
import { connect } from 'react-redux';
55
import { bindActionCreators } from 'redux';
66
import { withTranslation } from 'react-i18next';
7-
7+
import styled from 'styled-components';
88
import * as ProjectActions from '../actions/project';
99
import * as ProjectsActions from '../actions/projects';
1010
import * as CollectionsActions from '../actions/collections';
@@ -13,10 +13,24 @@ import * as SortingActions from '../actions/sorting';
1313
import getSortedCollections from '../selectors/collections';
1414
import Loader from '../../App/components/loader';
1515
import QuickAddList from './QuickAddList';
16+
import { remSize } from '../../../theme';
1617

1718
const projectInCollection = (project, collection) =>
1819
collection.items.find((item) => item.projectId === project.id) != null;
1920

21+
export const CollectionAddSketchWrapper = styled.div`
22+
width: ${remSize(600)};
23+
max-width: 100%;
24+
overflow: auto;
25+
`;
26+
27+
export const QuickAddWrapper = styled.div`
28+
width: ${remSize(600)};
29+
max-width: 100%;
30+
padding: ${remSize(24)};
31+
height: 100%;
32+
`;
33+
2034
class CollectionList extends React.Component {
2135
constructor(props) {
2236
super(props);
@@ -85,15 +99,14 @@ class CollectionList extends React.Component {
8599
}
86100

87101
return (
88-
<div className="collection-add-sketch">
89-
<div className="quick-add-wrapper">
102+
<CollectionAddSketchWrapper>
103+
<QuickAddWrapper>
90104
<Helmet>
91105
<title>{this.getTitle()}</title>
92106
</Helmet>
93-
94107
{content}
95-
</div>
96-
</div>
108+
</QuickAddWrapper>
109+
</CollectionAddSketchWrapper>
97110
);
98111
}
99112
}

client/modules/IDE/components/AddToCollectionSketchList.jsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import * as SortingActions from '../actions/sorting';
1212
import getSortedSketches from '../selectors/projects';
1313
import Loader from '../../App/components/loader';
1414
import QuickAddList from './QuickAddList';
15+
import {
16+
CollectionAddSketchWrapper,
17+
QuickAddWrapper
18+
} from './AddToCollectionList';
1519

1620
class SketchList extends React.Component {
1721
constructor(props) {
@@ -81,14 +85,14 @@ class SketchList extends React.Component {
8185
}
8286

8387
return (
84-
<div className="collection-add-sketch">
85-
<div className="quick-add-wrapper">
88+
<CollectionAddSketchWrapper>
89+
<QuickAddWrapper>
8690
<Helmet>
8791
<title>{this.getSketchesTitle()}</title>
8892
</Helmet>
8993
{content}
90-
</div>
91-
</div>
94+
</QuickAddWrapper>
95+
</CollectionAddSketchWrapper>
9296
);
9397
}
9498
}

0 commit comments

Comments
 (0)