import React from 'react'; import PropTypes from 'prop-types'; import {IFigureComponentProps} from 'superdesk-api'; export const Figure: React.StatelessComponent = (props) => { const editable = props.onRemove != null; return (
{editable && ( )}
{props.children}
{props.caption}
); }; Figure.propTypes = { caption: PropTypes.string, onRemove: PropTypes.func, children: PropTypes.node, };