diff --git a/docs/src/components/CarbonAd/CarbonAdNative.js b/docs/src/components/CarbonAd/CarbonAdNative.js index 6dff9340b7..bbc9189181 100644 --- a/docs/src/components/CarbonAd/CarbonAdNative.js +++ b/docs/src/components/CarbonAd/CarbonAdNative.js @@ -80,7 +80,7 @@ class CarbonAdNative extends Component { divider: '#333', background: '#222', backgroundHover: '#1d1d1d', - color: '#bbb', + color: '#999', colorHover: '#ccc', } : { @@ -93,7 +93,7 @@ class CarbonAdNative extends Component { return ( - + {ad.company} {' — '} {ad.description} @@ -102,7 +102,7 @@ class CarbonAdNative extends Component { basic={!inverted} color={inverted ? 'black' : undefined} horizontal - style={{ float: 'right' }} + style={{ position: 'absolute', right: '1rem', opacity: 0.5 }} /> {/* Impression */} @@ -123,17 +123,30 @@ class CarbonAdNative extends Component { ) diff --git a/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleRenderExample.js b/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleRenderExample.js index 3c36917518..3b663275df 100644 --- a/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleRenderExample.js +++ b/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleRenderExample.js @@ -48,6 +48,16 @@ class ComponentExampleRenderExample extends PureComponent { } } + canBePrettified = () => { + const { error, value } = this.props + + try { + return !error && value !== formatCode(value) + } catch (err) { + return false + } + } + handleCopy = () => { copyToClipboard(this.props.value) this.setState({ copiedCode: true }) @@ -81,10 +91,12 @@ class ComponentExampleRenderExample extends PureComponent { return (