import React from 'react'; import PropTypes from 'prop-types'; import { StylingFunction } from 'react-base16-styling'; interface Props { styling: StylingFunction; arrowStyle?: 'single' | 'double'; expanded: boolean; nodeType: string; onClick: React.MouseEventHandler; } const JSONArrow: React.FunctionComponent = ({ styling, arrowStyle, expanded, nodeType, onClick, }) => (
{'\u25B6'} {arrowStyle === 'double' && (
{'\u25B6'}
)}
); JSONArrow.propTypes = { styling: PropTypes.func.isRequired, arrowStyle: PropTypes.oneOf(['single', 'double']), expanded: PropTypes.bool.isRequired, nodeType: PropTypes.string.isRequired, onClick: PropTypes.func.isRequired, }; JSONArrow.defaultProps = { arrowStyle: 'single', }; export default JSONArrow;