From 169bf13dfc6bb419862f6378df1845c95b2a2b53 Mon Sep 17 00:00:00 2001 From: Zack Stickles Date: Fri, 12 Jun 2020 10:20:57 -0700 Subject: [PATCH] feat: adds the (optional) ability to have other content in intro --- src/components/Intro.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Intro.js b/src/components/Intro.js index cfb7a9571..e943a4265 100644 --- a/src/components/Intro.js +++ b/src/components/Intro.js @@ -4,14 +4,20 @@ import PropTypes from 'prop-types'; import styles from './Intro.module.scss'; -const Intro = ({ children }) => ( - +const Intro = ({ children, type }) => ( + {children} ); 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;