action.js 444 B

123456789101112131415161718192021
  1. import React from "react"
  2. export default class extends React.Component {
  3. onClick = () => {
  4. this.props.replaceSelection(this.props.execAction)
  5. }
  6. render() {
  7. return (
  8. <button
  9. className={"btn btn-icon " + this.props.className}
  10. disabled={this.props.disabled}
  11. onClick={this.onClick}
  12. title={this.props.title}
  13. type="button"
  14. >
  15. {this.props.children}
  16. </button>
  17. )
  18. }
  19. }