Skip to content

Commit

Permalink
feat: adds the (optional) ability to have other content in intro
Browse files Browse the repository at this point in the history
  • Loading branch information
zstix committed Jun 12, 2020
1 parent 7b82ffe commit 169bf13
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/Intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ import PropTypes from 'prop-types';

import styles from './Intro.module.scss';

const Intro = ({ children }) => (
<SideBySide type="Video" className={styles.container}>
const Intro = ({ children, type }) => (
<SideBySide type={type} className={styles.container}>
{children}
</SideBySide>
);

Intro.propTypes = {
children: PropTypes.node.isRequired,
// Only video or code is supported at the moment
type: PropTypes.oneOf('Video', 'pre'),
};

Intro.defaultProps = {
type: 'Video',
};

export default Intro;

0 comments on commit 169bf13

Please sign in to comment.