improvement: refactor Operation component structure (via #4686)

...into OperationSummary, OperationSummaryPath, OperationSummaryMethod
This commit is contained in:
geraldglynn
2018-07-18 01:37:36 +01:00
committed by kyle
parent 17f6a55d58
commit b9b4ab20af
6 changed files with 167 additions and 44 deletions

View File

@@ -0,0 +1,25 @@
import React, { PureComponent } from "react"
import PropTypes from "prop-types"
import { Iterable } from "immutable"
export default class OperationSummaryMethod extends PureComponent {
static propTypes = {
operationProps: PropTypes.instanceOf(Iterable).isRequired,
method: PropTypes.string.isRequired,
}
static defaultProps = {
operationProps: null,
}
render() {
let {
method,
} = this.props
return (
<span className="opblock-summary-method">{method.toUpperCase()}</span>
)
}
}