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 = () => {
7777 ) ;
7878 return (
7979 < Container >
80- < Header text = "Developer" />
80+ < Header text = "Developer" tooltipMsg = "Address of the current ruler of the selected arbitrable" />
8181 < InputContainer >
8282 < StyledLabel > Current Developer : { currentDeveloper ?? "None" } </ StyledLabel >
8383 < LabeledInput
Original file line number Diff line number Diff line change 11import React from "react" ;
22import styled from "styled-components" ;
3+ import WithHelpTooltip from "components/WithHelpTooltip" ;
34
4- const Container = styled . h2 `
5+ const Container = styled . div `
6+ width: 100%;
7+ display: flex;
8+ align-items: center;
59 border-bottom: 1px solid ${ ( { theme } ) => theme . klerosUIComponentsStroke } ;
610 padding: 8px 0px;
711` ;
812
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+ ) ;
1024
1125export default Header ;
Original file line number Diff line number Diff line change @@ -102,7 +102,10 @@ const ManualRuling: React.FC = () => {
102102
103103 return (
104104 < 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+ />
106109 < SelectContainer >
107110 < LabeledInput
108111 label = "Dispute ID"
Original file line number Diff line number Diff line change @@ -212,7 +212,10 @@ const RulingModes: React.FC = () => {
212212
213213 return (
214214 < 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+ />
216219 < StyledLabel >
217220 Current mode: < small > { getRulingModeText ( arbitrableSettings ?. rulingMode ) } </ small >
218221 </ 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