Home Reference Source

application/components/common/rich-editor2/util/icon-button.js

  1. import React, { Component } from 'react';
  2.  
  3. /**
  4. * Fake MaterialUI icon button here because
  5. * we're using the FontAwesome icons and they're not
  6. * the same size. So we use a fake component here so:
  7. *
  8. * 1. The icons remain the same size, and
  9. * 2. IconMenu doesn't freak out when we hit escape.
  10. */
  11. class IconButton extends Component {
  12.  
  13. setKeyboardFocus() {
  14. return null;
  15. }
  16.  
  17. render() {
  18. return (
  19. <i {...this.props}>{this.props.children}</i>
  20. );
  21. }
  22. }
  23.  
  24. export default IconButton;