Skip to content

Commit

Permalink
fix(docz-theme-default): playground relative position
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Dec 4, 2018
1 parent 7a7d1f8 commit a097b5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/docz-theme-default/src/components/ui/Render/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ const Wrapper = styled('div')`
const borderColor = themeGet('colors.border')
const backgroundColor = themeGet('colors.background')

const PlaygroundWrapper = styled('div')`
const PreviewWrapper = styled('div')`
overflow-y: auto;
position: relative;
flex: 1;
border: 1px solid ${borderColor};
background: ${backgroundColor};
min-height: ${whenFullscreen('198px', 'auto')};
`

const StyledPreview = styled(LivePreview)`
position: relative;
box-sizing: border-box;
width: 100%;
${p => p.theme.docz.mq(p.theme.docz.styles.playground)};
Expand All @@ -81,7 +81,8 @@ const StyledError = styled(LiveError)`
`

const Pre = styled(PreBase)`
width: calc(100% - 4px);
width: calc(100% - 2px);
border-radius: 0 !important;
margin: 0;
`

Expand Down Expand Up @@ -261,7 +262,6 @@ class RenderBase extends Component<RenderProps, RenderState> {
const { fullscreen, showEditor } = this.state

const editorProps = {
square: true,
className: editorClassName,
actions: <Fragment />,
}
Expand All @@ -277,10 +277,10 @@ class RenderBase extends Component<RenderProps, RenderState> {
{fullscreen ? <ResizeBar onChangeSize={this.handleSetSize} /> : null}
<Resizable {...this.resizableProps}>
<Wrapper full={fullscreen}>
<PlaygroundWrapper full={fullscreen}>
<PreviewWrapper full={fullscreen}>
<StyledPreview className={className} style={style} />
<StyledError />
</PlaygroundWrapper>
</PreviewWrapper>
{this.actions}
<EditorWrapper showing={showEditor}>
<Pre
Expand Down

0 comments on commit a097b5f

Please sign in to comment.