Browse Source

chore: add prop-types validation to code example

main
Dustin Schau 6 years ago
parent
commit
12c43455e7
  1. 8
      src/components/CodeExample/CodeExample.js

8
src/components/CodeExample/CodeExample.js

@ -1,4 +1,6 @@
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {colors, media} from 'theme';
import CodeEditor from '../CodeEditor/CodeEditor';
@ -57,4 +59,10 @@ class CodeExample extends Component {
}
}
CodeExample.propTypes = {
children: PropTypes.node,
code: PropTypes.string.isRequired,
loaded: PropTypes.bool.isRequired
};
export default CodeExample;

Loading…
Cancel
Save