improvement: refactor Operation component structure (via #4686)
...into OperationSummary, OperationSummaryPath, OperationSummaryMethod
This commit is contained in:
25
src/core/components/operation-summary-method.jsx
Normal file
25
src/core/components/operation-summary-method.jsx
Normal 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>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user