File tree Expand file tree Collapse file tree 5 files changed +21
-6
lines changed Expand file tree Collapse file tree 5 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,10 @@ class Overlay extends React.Component {
66
66
title,
67
67
children,
68
68
actions,
69
+ isFixedHeight,
69
70
} = this . props ;
70
71
return (
71
- < div className = " overlay" >
72
+ < div className = { ` overlay ${ isFixedHeight ? 'overlay--is-fixed-height' : '' } ` } >
72
73
< div className = "overlay__content" >
73
74
< section
74
75
role = "main"
@@ -99,7 +100,8 @@ Overlay.propTypes = {
99
100
closeOverlay : PropTypes . func ,
100
101
title : PropTypes . string ,
101
102
ariaLabel : PropTypes . string ,
102
- previousPath : PropTypes . string
103
+ previousPath : PropTypes . string ,
104
+ isFixedHeight : PropTypes . bool ,
103
105
} ;
104
106
105
107
Overlay . defaultProps = {
@@ -108,7 +110,8 @@ Overlay.defaultProps = {
108
110
title : 'Modal' ,
109
111
closeOverlay : null ,
110
112
ariaLabel : 'modal' ,
111
- previousPath : '/'
113
+ previousPath : '/' ,
114
+ isFixedHeight : false ,
112
115
} ;
113
116
114
117
export default Overlay ;
Original file line number Diff line number Diff line change @@ -407,6 +407,7 @@ class SketchList extends React.Component {
407
407
{
408
408
this . state . sketchToAddToCollection &&
409
409
< Overlay
410
+ isFixedHeight
410
411
title = "Add to collection"
411
412
closeOverlay = { ( ) => this . setState ( { sketchToAddToCollection : null } ) }
412
413
>
Original file line number Diff line number Diff line change @@ -383,6 +383,7 @@ class IDEView extends React.Component {
383
383
title = "Add sketch to collection"
384
384
previousPath = { this . props . ide . previousPath }
385
385
actions = { < CollectionSearchbar /> }
386
+ isFixedHeight
386
387
>
387
388
< AddToCollectionList
388
389
projectId = { this . props . params . project_id }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import { getCollection } from '../../IDE/selectors/collections';
17
17
import Loader from '../../App/components/loader' ;
18
18
import EditableInput from '../../IDE/components/EditableInput' ;
19
19
import Overlay from '../../App/components/Overlay' ;
20
- import SketchList from '../../IDE/components/AddToCollectionSketchList' ;
20
+ import AddToCollectionSketchList from '../../IDE/components/AddToCollectionSketchList' ;
21
21
import CopyableInput from '../../IDE/components/CopyableInput' ;
22
22
import { SketchSearchbar } from '../../IDE/components/Searchbar' ;
23
23
import dropdownArrow from '../../../images/down-arrow.svg' ;
@@ -321,9 +321,9 @@ class Collection extends React.Component {
321
321
}
322
322
{
323
323
this . state . isAddingSketches && (
324
- < Overlay title = "Add sketches" actions = { < SketchSearchbar /> } closeOverlay = { this . hideAddSketches } >
324
+ < Overlay title = "Add sketches" actions = { < SketchSearchbar /> } closeOverlay = { this . hideAddSketches } isFixedHeight >
325
325
< div className = "collection-add-sketch" >
326
- < SketchList username = { this . props . username } collection = { this . props . collection } />
326
+ < AddToCollectionSketchList username = { this . props . username } collection = { this . props . collection } />
327
327
</ div >
328
328
</ Overlay >
329
329
)
Original file line number Diff line number Diff line change 46
46
@include icon ();
47
47
padding : #{3 / $base-font-size } rem 0 #{3 / $base-font-size } rem #{10 / $base-font-size } rem;
48
48
}
49
+
50
+ /* Fixed height overlay */
51
+ .overlay--is-fixed-height .overlay__body {
52
+ height : 80vh ;
53
+ }
54
+
55
+ .overlay--is-fixed-height .overlay__header {
56
+ flex : 0 ;
57
+ }
58
+
You can’t perform that action at this time.
0 commit comments