@@ -3,6 +3,8 @@ import styled from "styled-components";
3
3
4
4
import { Group } from "consts/disputeFeature" ;
5
5
6
+ import LightButton from "../LightButton" ;
7
+
6
8
const Container = styled . div `
7
9
width: 100%;
8
10
display: flex;
@@ -18,9 +20,12 @@ const HeaderContainer = styled.div`
18
20
` ;
19
21
20
22
const Header = styled . h2 `
23
+ display: flex;
21
24
font-size: 16px;
22
25
font-weight: 600;
23
26
margin: 0;
27
+ align-items: center;
28
+ gap: 8px;
24
29
` ;
25
30
26
31
const SubTitle = styled . p `
@@ -30,21 +35,39 @@ const SubTitle = styled.p`
30
35
margin: 0;
31
36
` ;
32
37
33
- export type GroupUI = ( props : { children : JSX . Element } ) => JSX . Element ;
38
+ const StyledLightButton = styled ( LightButton ) `
39
+ padding: 0 !important;
40
+ .button-text {
41
+ color: ${ ( { theme } ) => theme . primaryBlue } ;
42
+ font-size: 14px;
43
+ }
44
+ :hover {
45
+ background-color: transparent !important;
46
+ .button-text {
47
+ color: ${ ( { theme } ) => theme . secondaryBlue } ;
48
+ }
49
+ }
50
+ ` ;
51
+
52
+ export type GroupUI = ( props : { children : JSX . Element ; clearAll : ( ) => void } ) => JSX . Element ;
34
53
export const GroupsUI : Record < Group , GroupUI > = {
35
- [ Group . Voting ] : ( { children } ) => (
54
+ [ Group . Voting ] : ( { children, clearAll } ) => (
36
55
< Container key = { Group . Voting } >
37
56
< HeaderContainer >
38
- < Header > Shielded Voting</ Header >
57
+ < Header >
58
+ Shielded Voting < StyledLightButton text = "Clear" onClick = { clearAll } />
59
+ </ Header >
39
60
< SubTitle > This feature hides the jurors votes until the end of the voting period.</ SubTitle >
40
61
</ HeaderContainer >
41
62
{ children }
42
63
</ Container >
43
64
) ,
44
- [ Group . Eligibility ] : ( { children } ) => (
65
+ [ Group . Eligibility ] : ( { children, clearAll } ) => (
45
66
< Container key = { Group . Eligibility } >
46
67
< HeaderContainer >
47
- < Header > Jurors Eligibility</ Header >
68
+ < Header >
69
+ Jurors Eligibility < StyledLightButton text = "Clear" onClick = { clearAll } />
70
+ </ Header >
48
71
< SubTitle > This feature determines who can be selected as a juror.</ SubTitle >
49
72
</ HeaderContainer >
50
73
{ children }
0 commit comments