+ this.setState(prevState => ({ truncated: !prevState.truncated }))
+
+ render() {
+ const { text, maxWords } = this.props
+ const { truncated } = this.state
+
+ const words = text.split(' ')
+ return (
+
+
+ {truncated && words.length > maxWords
+ ? words.slice(0, maxWords).join(' ')
+ : text}
+
+ {words.length > maxWords && (
+
+ Show {truncated ? 'More ∧' : 'Less ∨'}
+
+ )}
+
+ )
+ }
+}
diff --git a/src/components/truncated-text-box/truncated-text-box.scss b/src/components/truncated-text-box/truncated-text-box.scss
new file mode 100644
index 0000000..447abbd
--- /dev/null
+++ b/src/components/truncated-text-box/truncated-text-box.scss
@@ -0,0 +1,10 @@
+@import '../../styles/_colors.scss';
+
+/* @define TruncatedTextBox */
+.TruncatedTextBox {
+ &-actionDiv {
+ color: $info;
+ font-size: 14px;
+ user-select: none;
+ }
+}
diff --git a/src/containers/dispute/components/details/index.js b/src/containers/dispute/components/details/index.js
index 8d7237d..b0820d8 100644
--- a/src/containers/dispute/components/details/index.js
+++ b/src/containers/dispute/components/details/index.js
@@ -5,6 +5,7 @@ import { ChainData } from '../../../../chainstrap'
import { ARBITRATOR_ADDRESS } from '../../../../bootstrap/dapp-api'
import { dateToString } from '../../../../utils/date'
import LabelValueGroup from '../../../../components/label-value-group'
+import TruncatedTextBox from '../../../../components/truncated-text-box'
import * as chainViewConstants from '../../../../constants/chain-view'
import './details.css'
@@ -16,7 +17,8 @@ const Details = ({
arbitrationFee,
arbitrableContractAddress,
disputeID,
- appealNumber
+ appealNumber,
+ description
}) => (
@@ -73,6 +75,9 @@ const Details = ({
]}
/>
+ Contract Description
+
+
)
@@ -84,7 +89,8 @@ Details.propTypes = {
arbitrationFee: PropTypes.number.isRequired,
arbitrableContractAddress: PropTypes.string.isRequired,
disputeID: PropTypes.number.isRequired,
- appealNumber: PropTypes.number.isRequired
+ appealNumber: PropTypes.number.isRequired,
+ description: PropTypes.string.isRequired
}
export default Details
diff --git a/src/containers/dispute/components/ruling/index.js b/src/containers/dispute/components/ruling/index.js
index ffeeb36..1badee2 100644
--- a/src/containers/dispute/components/ruling/index.js
+++ b/src/containers/dispute/components/ruling/index.js
@@ -52,59 +52,63 @@ const Ruling = ({