Skip to content

Commit

Permalink
Fixed width of AppLayout views to ensure they show the drawer when lo…
Browse files Browse the repository at this point in the history
…aded on normal sized screens
  • Loading branch information
mhawkinsbasis committed Aug 24, 2023
1 parent 85978cc commit 3e82a49
Showing 1 changed file with 43 additions and 42 deletions.
85 changes: 43 additions & 42 deletions src/components/DocsTools/AppLayoutViewer.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
/** @jsx jsx*/

import React from 'react'
import { jsx, css } from '@emotion/react';

export default function AppLayoutViewer({url, mobile}) {

const demoStyles = css`
display: flex;
flex-direction: column;
align-items: center;
margin: 4rem 0;
width: 100%;
`

const demoPreview = css`
position: relative;
width : 100%;
max-width: ${mobile == 'true' ? '375px' : '100%'};
height: ${mobile == 'true' ? '700px' : '600px'};
border-radius: 32px;
overflow: hidden;
box-shadow: 0 0 0 10px black, 0 3px 22px black;
outline: thin solid black;
`

const demoContent = css`
width: 100%;
height: 100%;
background: var(--bbj-surface-3);
`

return (
<div css={demoStyles}>
<div css={demoPreview}>
<iframe src={url} css={demoContent} loading='lazy'>

</iframe>
</div>
</div>
);
}
/** @jsx jsx*/

import React from 'react'
import { jsx, css } from '@emotion/react';

export default function AppLayoutViewer({url, mobile}) {

const demoStyles = css`
display: flex;
flex-direction: column;
align-items: center;
margin: 4rem 0;
width: 110%;
margin-left: -5%;
`

const demoPreview = css`
position: relative;
width : 100%;
max-width: ${mobile == 'true' ? '375px' : '100%'};
height: ${mobile == 'true' ? '700px' : '600px'};
border-radius: 32px;
overflow: hidden;
box-shadow: 0 0 0 10px black, 0 3px 22px black;
outline: thin solid black;
`

const demoContent = css`
width: 100%;
height: 100%;
background: var(--bbj-surface-3);
`

return (
<div css={demoStyles}>
<div css={demoPreview}>
<iframe src={url} css={demoContent} loading='lazy'>

</iframe>
</div>
</div>
);
}

0 comments on commit 3e82a49

Please sign in to comment.