Skip to content

Commit

Permalink
fix: style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Nov 13, 2019
1 parent bbd8392 commit 48def76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/components/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ export function Editor(
autofocus: true,
theme: "netlify-light",
lineWrapping: true,
value: props.initbody || ""
value: props.initbody || "",
viewportMargin: Infinity
});

editor.on("change", () => {
props.onChange(editor.getValue());
});
}, []);
const { initbody, ...attrs } = props;

return <div {...props} ref={r => (refEditor = r)} className="editor"></div>;
return <div {...attrs} ref={r => (refEditor = r)} className="editor"></div>;
}
8 changes: 7 additions & 1 deletion src/components/editor/style.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.editor .CodeMirror
.editor
height 100vh

.editor .CodeMirror-scroll
min-height 80vh

.editor .CodeMirror
height auto
width 800px
padding 30px 0 0 0
box-sizing border-box
Expand Down
3 changes: 1 addition & 2 deletions src/lambda/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export async function handler(event) {
<html>
<head>
<meta charset="utf-8"/>
<title>${(title ? title.text : "Untitled") +
" - Powered by Typer"}</title>
<title>${(title ? title.text : "Untitled") + " - Typer"}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500|Roboto+Mono" rel="stylesheet">
Expand Down

0 comments on commit 48def76

Please sign in to comment.