File size: 847 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
import React from 'react';
import PropTypes from 'prop-types';
import { Container } from 'react-bootstrap';
const propTypes = {
codeSandbox: PropTypes.shape({
title: PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
}).isRequired,
};
const Example = ({ codeSandbox }) => (
<div style={{ marginBottom: '1.5rem' }}>
<Container>
<h2>Example</h2>
</Container>
<iframe
title={codeSandbox.title}
src={`https://codesandbox.io/embed/${codeSandbox.id}?fontsize=14`}
style={{
display: 'block',
width: '100%',
height: '500px',
border: 0,
borderRadius: 4,
overflow: 'hidden',
}}
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
/>
</div>
);
Example.propTypes = propTypes;
export default Example;
|