Skip to content

Commit

Permalink
Base styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Nov 28, 2019
1 parent b975358 commit 991c7d7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
28 changes: 16 additions & 12 deletions packages/editor/src/components/post-preview-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,23 @@ export class PostPreviewButton extends Component {
onRequestClose={ this.closePreviewWindow }
className="editor-block-preview"
>
<button onClick={ this.setDesktopPreview }>Desktop</button>
<button onClick={ this.setTabletPreview }>Tablet</button>
<button onClick={ this.setMobilePreview }>Mobile</button>
<iframe
title="tehPreview"
src={ previewLink }
style={
{
width: this.state.previewSize.width,
height: this.state.previewSize.height,
<div className="editor-block-preview__controls">
<button onClick={ this.setDesktopPreview }>Desktop</button>
<button onClick={ this.setTabletPreview }>Tablet</button>
<button onClick={ this.setMobilePreview }>Mobile</button>
</div>
<div className="editor-block-preview__frame">
<iframe
title="tehPreview"
src={ previewLink }
style={
{
width: this.state.previewSize.width,
height: this.state.previewSize.height,
}
}
}
></iframe>
></iframe>
</div>
</Modal>
}
</>
Expand Down
18 changes: 18 additions & 0 deletions packages/editor/src/components/post-preview-button/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.editor-block-preview {
@include break-small() {
top: 5%;
right: 5%;
bottom: 5%;
left: 5%;
transform: none;
}
}

.editor-block-preview__controls {
margin: $grid-size-large 0;
}

.editor-block-preview__frame {
display: flex;
justify-content: center;
}
1 change: 1 addition & 0 deletions packages/editor/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import "./components/post-last-revision/style.scss";
@import "./components/post-locked-modal/style.scss";
@import "./components/post-permalink/style.scss";
@import "./components/post-preview-button/style.scss";
@import "./components/post-publish-panel/style.scss";
@import "./components/post-saved-state/style.scss";
@import "./components/post-taxonomies/style.scss";
Expand Down

0 comments on commit 991c7d7

Please sign in to comment.