fix embed URL button

main
Mike Fix 6 years ago
parent 28a455eecc
commit 156e61c3ba

@ -95,6 +95,8 @@ class Carbon extends React.PureComponent {
const themeConfig = this.props.theme || THEMES_HASH[config.theme] const themeConfig = this.props.theme || THEMES_HASH[config.theme]
const light = themeConfig && themeConfig.light
const content = ( const content = (
<div className="container"> <div className="container">
{config.windowControls ? ( {config.windowControls ? (
@ -102,7 +104,7 @@ class Carbon extends React.PureComponent {
theme={config.windowTheme} theme={config.windowTheme}
code={this.props.children} code={this.props.children}
copyable={this.props.copyable} copyable={this.props.copyable}
light={themeConfig.light} light={light}
/> />
) : null} ) : null}
<CodeMirror <CodeMirror
@ -111,7 +113,7 @@ class Carbon extends React.PureComponent {
value={this.props.children} value={this.props.children}
options={options} options={options}
/> />
{config.watermark && <Watermark light={themeConfig.light} />} {config.watermark && <Watermark light={light} />}
<div className="container-bg"> <div className="container-bg">
<div className="white eliminateOnRender" /> <div className="white eliminateOnRender" />
<div className="alpha eliminateOnRender" /> <div className="alpha eliminateOnRender" />

@ -15,7 +15,7 @@ const toIFrame = url =>
</iframe> </iframe>
` `
const toURL = url => encodeURI(`${location.origin}/embed${url}`) const toURL = url => encodeURI(`${location.origin}${url}`)
const MAX_PAYLOAD_SIZE = 5e6 // bytes const MAX_PAYLOAD_SIZE = 5e6 // bytes
function verifyPayloadSize(str) { function verifyPayloadSize(str) {

Loading…
Cancel
Save