NotFoundAlert.jsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. const NotFoundAlert = (props) => {
  4. function clickHandler(viewType) {
  5. if (props.onPageCreateClicked === null) {
  6. return;
  7. }
  8. props.onPageCreateClicked(viewType);
  9. }
  10. return (
  11. <div className="grw-not-found-alert border m-4 p-4">
  12. <div className="col-md-12">
  13. <h2 className="text-muted not-found-text">
  14. <i className="icon-info" aria-hidden="true"></i>
  15. {/* Todo make the message supported by i18n GW4050 */ }
  16. このページは存在しません。新たに作成する必要があります。
  17. </h2>
  18. <button
  19. type="button"
  20. className="m-2 p-2"
  21. onClick={() => { clickHandler('edit') }}
  22. >
  23. <i className="icon-note icon-fw" />
  24. {/* Todo make the message supported by i18n GW4050 */ }
  25. ページを作成する
  26. </button>
  27. </div>
  28. </div>
  29. );
  30. };
  31. NotFoundAlert.propTypes = {
  32. onPageCreateClicked: PropTypes.func,
  33. };
  34. export default NotFoundAlert;