SimpleCheatsheet.jsx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { withTranslation } from 'react-i18next';
  4. class SimpleCheatsheet extends React.Component {
  5. render() {
  6. const { t } = this.props;
  7. return (
  8. <div className="card bg-default gfm-cheatsheet mb-0">
  9. <div className="card-body small p-b-0">
  10. <div className="row">
  11. <div className="col-sm-6">
  12. <p>
  13. # {t('sandbox.header_x', { index: '1' })}<br />
  14. ## {t('sandbox.header_x', { index: '2' })}
  15. </p>
  16. <p><i>*{t('sandbox.italics')}*</i>&nbsp;&nbsp;<b>**{t('sandbox.bold')}**</b></p>
  17. <p>
  18. [{t('sandbox.link')}](http://..)<br />
  19. [/Page1/ChildPage1]
  20. </p>
  21. <p>
  22. ```javascript:index.js<br />
  23. writeCode();<br />
  24. ```
  25. </p>
  26. </div>
  27. <div className="col-sm-6">
  28. <p>
  29. - {t('sandbox.unordered_list_x', { index: '1' })}<br />
  30. &nbsp;&nbsp;&nbsp;- {t('sandbox.unordered_list_x', { index: '1.1' })}<br />
  31. - {t('sandbox.unordered_list_x', { index: '2' })}<br />
  32. 1. {t('sandbox.ordered_list_x', { index: '1' })}<br />
  33. 1. {t('sandbox.ordered_list_x', { index: '2' })}
  34. </p>
  35. <hr />
  36. <p>[ ][ ] {t('sandbox.block_detail')}</p>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. );
  42. }
  43. }
  44. SimpleCheatsheet.propTypes = {
  45. t: PropTypes.func.isRequired, // i18next
  46. };
  47. export default withTranslation()(SimpleCheatsheet);