@@ -14,24 +14,20 @@ import { StyledSkeleton } from "components/StyledSkeleton";
14
14
15
15
import AliasDisplay from "./Alias" ;
16
16
import { Divider } from "../Divider" ;
17
+ import { ExternalLink } from "../ExternalLink" ;
17
18
18
19
const StyledH1 = styled . h1 `
19
20
margin: 0;
20
21
word-wrap: break-word;
21
22
` ;
22
23
23
- const QuestionAndDescription = styled . div `
24
- display: flex;
25
- flex-direction: column;
26
- word-wrap: break-word;
27
- div:first-child p:first-of-type {
28
- font-size: 16px;
29
- font-weight: 400;
24
+ const ReactMarkdownWrapper = styled . div `
25
+ & p:first-of-type {
30
26
margin: 0;
31
27
}
32
28
` ;
33
29
34
- const VotingOptions = styled ( QuestionAndDescription ) `
30
+ const VotingOptions = styled . div `
35
31
display: flex;
36
32
flex-direction: column;
37
33
gap: 8px;
@@ -51,19 +47,6 @@ const Answer = styled.div`
51
47
display: flex;
52
48
flex-wrap: wrap;
53
49
gap: 6px;
54
- > label {
55
- max-width: 100%;
56
- }
57
- ` ;
58
-
59
- const StyledSmall = styled . small `
60
- color: ${ ( { theme } ) => theme . secondaryText } ;
61
- font-weight: 400;
62
- ` ;
63
-
64
- const StyledLabel = styled . label `
65
- color: ${ ( { theme } ) => theme . primaryText } ;
66
- font-weight: 600;
67
50
` ;
68
51
69
52
const AliasesContainer = styled . div `
@@ -83,26 +66,29 @@ export const DisputeContext: React.FC<IDisputeContext> = ({ disputeDetails, isRp
83
66
< >
84
67
< StyledH1 > { isUndefined ( disputeDetails ) ? < StyledSkeleton /> : ( disputeDetails ?. title ?? errMsg ) } </ StyledH1 >
85
68
{ ! isUndefined ( disputeDetails ) && (
86
- < QuestionAndDescription >
87
- < ReactMarkdown > { disputeDetails ?. question } </ ReactMarkdown >
88
- < ReactMarkdown > { disputeDetails ?. description } </ ReactMarkdown >
89
- </ QuestionAndDescription >
69
+ < >
70
+ < ReactMarkdownWrapper >
71
+ < ReactMarkdown > { disputeDetails ?. question } </ ReactMarkdown >
72
+ </ ReactMarkdownWrapper >
73
+ < ReactMarkdownWrapper >
74
+ < ReactMarkdown > { disputeDetails ?. description } </ ReactMarkdown >
75
+ </ ReactMarkdownWrapper >
76
+ </ >
90
77
) }
91
78
{ isUndefined ( disputeDetails ?. frontendUrl ) ? null : (
92
- < a href = { disputeDetails ?. frontendUrl } target = "_blank" rel = "noreferrer" >
79
+ < ExternalLink href = { disputeDetails ?. frontendUrl } target = "_blank" rel = "noreferrer" >
93
80
Go to arbitrable
94
- </ a >
81
+ </ ExternalLink >
95
82
) }
96
83
< VotingOptions >
97
84
{ isUndefined ( disputeDetails ) ? null : < AnswersHeader > Voting Options</ AnswersHeader > }
98
85
< AnswersContainer >
99
86
{ disputeDetails ?. answers ?. map ( ( answer : IAnswer , i : number ) => (
100
87
< Answer key = { answer . title } >
101
- < StyledSmall > { i + 1 + `.` } </ StyledSmall >
102
- < StyledLabel >
103
- { answer . title }
88
+ < small >
89
+ < label > { i + 1 } .</ label > { answer . title }
104
90
{ answer . description . trim ( ) ? ` - ${ answer . description } ` : null }
105
- </ StyledLabel >
91
+ </ small >
106
92
</ Answer >
107
93
) ) }
108
94
</ AnswersContainer >
0 commit comments