/** * @prettier */ import React from "react" import PropTypes from "prop-types" import ImPropTypes from "react-immutable-proptypes" import { stringify } from "core/utils" export default function Example(props) { const { example, showValue, getComponent, getConfigs } = props const Markdown = getComponent("Markdown", true) const HighlightCode = getComponent("highlightCode") if(!example) return null return (
{example.get("description") ? (
Example Description

) : null} {showValue && example.has("value") ? (
Example Value
) : null}
) } Example.propTypes = { example: ImPropTypes.map.isRequired, showValue: PropTypes.bool, getComponent: PropTypes.func.isRequired, getConfigs: PropTypes.func.getConfigs, }