RevisionPathControls.jsx 671 B

12345678910111213141516171819202122232425262728293031323334
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { withTranslation } from 'react-i18next';
  4. import CopyDropdown from './CopyDropdown';
  5. const RevisionPathControls = (props) => {
  6. // define styles
  7. const buttonStyle = {
  8. marginLeft: '0.5em',
  9. padding: '0 2px',
  10. };
  11. const {
  12. pagePath, pageId,
  13. } = props;
  14. return (
  15. <>
  16. <CopyDropdown pagePath={pagePath} pageId={pageId} buttonStyle={buttonStyle} />
  17. </>
  18. );
  19. };
  20. RevisionPathControls.propTypes = {
  21. t: PropTypes.func.isRequired, // i18next
  22. pagePath: PropTypes.string.isRequired,
  23. pageId: PropTypes.string,
  24. };
  25. export default withTranslation()(RevisionPathControls);