File tree Expand file tree Collapse file tree 6 files changed +76
-5
lines changed Expand file tree Collapse file tree 6 files changed +76
-5
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ const ChangeDeveloper: React.FC = () => {
77
77
) ;
78
78
return (
79
79
< Container >
80
- < Header text = "Developer" />
80
+ < Header text = "Developer" tooltipMsg = "Address of the current ruler of the selected arbitrable" />
81
81
< InputContainer >
82
82
< StyledLabel > Current Developer : { currentDeveloper ?? "None" } </ StyledLabel >
83
83
< LabeledInput
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
import styled from "styled-components" ;
3
+ import WithHelpTooltip from "components/WithHelpTooltip" ;
3
4
4
- const Container = styled . h2 `
5
+ const Container = styled . div `
6
+ width: 100%;
7
+ display: flex;
8
+ align-items: center;
5
9
border-bottom: 1px solid ${ ( { theme } ) => theme . klerosUIComponentsStroke } ;
6
10
padding: 8px 0px;
7
11
` ;
8
12
9
- const Header : React . FC < { text : string } > = ( { text } ) => < Container > { text } </ Container > ;
13
+ const Title = styled . h2 `
14
+ margin: 0;
15
+ ` ;
16
+
17
+ const Header : React . FC < { text : string ; tooltipMsg : string } > = ( { text, tooltipMsg } ) => (
18
+ < Container >
19
+ < WithHelpTooltip tooltipMsg = { tooltipMsg } place = "right" >
20
+ < Title > { text } </ Title >
21
+ </ WithHelpTooltip >
22
+ </ Container >
23
+ ) ;
10
24
11
25
export default Header ;
Original file line number Diff line number Diff line change @@ -102,7 +102,10 @@ const ManualRuling: React.FC = () => {
102
102
103
103
return (
104
104
< Container >
105
- < Header text = "Manual Ruling" />
105
+ < Header
106
+ text = "Manual Ruling"
107
+ tooltipMsg = "Provide Manual ruling for the arbitrator. This operation will change the ruling mode to Manual, if the ruling mode is not Manual"
108
+ />
106
109
< SelectContainer >
107
110
< LabeledInput
108
111
label = "Dispute ID"
Original file line number Diff line number Diff line change @@ -212,7 +212,10 @@ const RulingModes: React.FC = () => {
212
212
213
213
return (
214
214
< Container >
215
- < Header text = "Ruling Mode" />
215
+ < Header
216
+ text = "Ruling Mode"
217
+ tooltipMsg = "Current Ruling mode of the arbitrator. Learn more about ruling modes here."
218
+ />
216
219
< StyledLabel >
217
220
Current mode: < small > { getRulingModeText ( arbitrableSettings ?. rulingMode ) } </ small >
218
221
</ StyledLabel >
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+ import styled , { css } from "styled-components" ;
3
+
4
+ import { Tooltip } from "@kleros/ui-components-library" ;
5
+
6
+ import _HelpIcon from "svgs/icons/help.svg" ;
7
+
8
+ import { landscapeStyle } from "styles/landscapeStyle" ;
9
+
10
+ const Container = styled . div `
11
+ display : flex;
12
+ align-items : center;
13
+ ` ;
14
+
15
+ const HelpIcon = styled ( _HelpIcon ) `
16
+ display: flex;
17
+ align-items: center;
18
+ height: 12px;
19
+ width: 12px;
20
+ fill: ${ ( { theme } ) => theme . klerosUIComponentsSecondaryText } ;
21
+ margin: 0 0 0 8px;
22
+
23
+ ${ landscapeStyle (
24
+ ( ) => css `
25
+ height : 14px ;
26
+ width : 14px ;
27
+ `
28
+ ) }
29
+ ` ;
30
+
31
+ interface IWithHelpTooltip {
32
+ tooltipMsg : string ;
33
+ place ?: "bottom" | "left" | "right" | "top" ;
34
+ children ?: React . ReactNode ;
35
+ }
36
+
37
+ const WithHelpTooltip : React . FC < IWithHelpTooltip > = ( { tooltipMsg, children, place } ) => (
38
+ < Container >
39
+ { children }
40
+ < Tooltip small text = { tooltipMsg } { ...{ place } } >
41
+ < HelpIcon />
42
+ </ Tooltip >
43
+ </ Container >
44
+ ) ;
45
+
46
+ export default WithHelpTooltip ;
You can’t perform that action at this time.
0 commit comments