PresentationForm.jsx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { withTranslation } from 'react-i18next';
  4. import { createSubscribedElement } from '../../UnstatedUtils';
  5. import AppContainer from '../../../services/AppContainer';
  6. import MarkDownSettingContainer from '../../../services/MarkDownSettingContainer';
  7. import PresentationLineBreakOptions from './PresentationLineBreakOptions';
  8. class PresentationForm extends React.Component {
  9. render() {
  10. const { t } = this.props;
  11. return (
  12. <fieldset className="form-group row my-2">
  13. <label className="col-xs-3 control-label text-right">
  14. { t('markdown_setting.Page break setting') }
  15. </label>
  16. <PresentationLineBreakOptions />
  17. <div className="form-group my-3">
  18. <div className="col-xs-offset-4 col-xs-5">
  19. {/* TODO GW-220 create function */}
  20. <button type="submit" className="btn btn-primary">{ t('Update') }</button>
  21. </div>
  22. </div>
  23. </fieldset>
  24. );
  25. }
  26. }
  27. const PresentationFormWrapper = (props) => {
  28. return createSubscribedElement(PresentationForm, props, [AppContainer, MarkDownSettingContainer]);
  29. };
  30. PresentationForm.propTypes = {
  31. t: PropTypes.func.isRequired, // i18next
  32. appContainer: PropTypes.instanceOf(AppContainer).isRequired,
  33. markDownSettingContainer: PropTypes.instanceOf(MarkDownSettingContainer).isRequired,
  34. };
  35. export default withTranslation()(PresentationFormWrapper);