Commit 429a0a82 authored by chris's avatar chris

remove custom div

parent 637f0300
......@@ -17,16 +17,12 @@ const GlobalStyle = createGlobalStyle`
body {
margin: 0;
padding: 0;
.page-wrapper {
height: ${props => (props.debug ? "50vh" : "100vh")}
}
}
`;
const PageWrapper = styled.div`
position: relative;
height: 100vh;
width: 100vw;
const StyledWax = styled(Wax)`
.wax-surface-scroll {
height: ${props => (props.debug ? "50vh" : "100%")};
}
`;
class Editoria extends Component {
......@@ -34,21 +30,19 @@ class Editoria extends Component {
return (
<React.Fragment>
<GlobalStyle />
<PageWrapper className="page-wrapper">
<Wax
options={options}
autoFocus
placeholder="Type Something..."
theme="editoria"
layout="editoria"
renderLayout={({ editor, ...props }) => (
<React.Fragment>
<MainMenuBar {...props} />
<div className="wax-surface-scroll">{editor}</div>
</React.Fragment>
)}
/>
</PageWrapper>
<StyledWax
options={options}
autoFocus
placeholder="Type Something..."
theme="editoria"
layout="editoria"
renderLayout={({ editor, ...props }) => (
<React.Fragment>
<MainMenuBar {...props} />
<div className="wax-surface-scroll">{editor}</div>
</React.Fragment>
)}
/>
</React.Fragment>
);
}
......
......@@ -71,6 +71,7 @@ class Wax extends Component {
renderLayout,
fileUpload,
readonly,
className,
value,
onBlur,
layout,
......@@ -81,12 +82,14 @@ class Wax extends Component {
<React.Fragment>{editor}</React.Fragment>
);
console.log(className);
const WaxRender = renderLayout ? renderLayout : defaultRender;
const WaxLayout = layout
? `wax-container wax-l-${layout}`
: "wax-container";
return (
<div className={WaxLayout}>
<div className={`${WaxLayout} ${className}`}>
<Editor
autoFocus={autoFocus}
readonly={readonly}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment