-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
a10cedf
commit cf9ea90
Showing
3 changed files
with
20 additions
and
88 deletions.
There are no files selected for viewing
85 changes: 0 additions & 85 deletions
85
core/gatsby-theme-docz/src/components/Playground/IframeWrapper.js
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
core/gatsby-theme-docz/src/components/Playground/LivePreviewWrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** @jsx jsx */ | ||
import { jsx } from 'theme-ui' | ||
|
||
const styles = { | ||
iframe: (showingCode, height = 'auto') => ({ | ||
height, | ||
display: 'block', | ||
minHeight: '100%', | ||
width: 'calc(100% - 2px)', | ||
border: t => `1px solid ${t.colors.playground.border}`, | ||
borderRadius: showingCode ? '4px 4px 0 0' : '4px', | ||
}), | ||
} | ||
|
||
export const LivePreviewWrapper = ({ children, showingCode }) => { | ||
return <div sx={styles.iframe(showingCode)}>{children}</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters