-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
258 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import { StandardPagination } from "@kleros/ui-components-library"; | ||
import DisputeCard from "components/DisputeCard"; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 8px; | ||
`; | ||
|
||
// 24px as margin-top since we already have 8px from the flex gap | ||
const StyledPagination = styled(StandardPagination)` | ||
margin-top: 24px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
`; | ||
|
||
const CasesMatrix: React.FC = () => ( | ||
<Container> | ||
<DisputeCard | ||
title="Register Profile in Proof of Humanity" | ||
id={600} | ||
period={1} | ||
court="Humanity" | ||
category="Identity" | ||
rewards="≥ 0.3 ETH" | ||
date={1651244935} | ||
/> | ||
<DisputeCard | ||
title="Register Profile in Proof of Humanity" | ||
id={600} | ||
period={3} | ||
court="Humanity" | ||
category="Identity" | ||
rewards="≥ 0.3 ETH" | ||
date={1651244935} | ||
/> | ||
<DisputeCard | ||
title="Register Profile in Proof of Humanity" | ||
id={600} | ||
period={4} | ||
court="Humanity" | ||
category="Identity" | ||
rewards="≥ 0.3 ETH" | ||
date={1651244935} | ||
/> | ||
<StyledPagination currentPage={1} numPages={1} callback={() => {}} /> | ||
</Container> | ||
); | ||
|
||
export default CasesMatrix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from "react"; | ||
import styled, { useTheme } from "styled-components"; | ||
import { DropdownSelect } from "@kleros/ui-components-library"; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
justify-content: end; | ||
gap: 12px; | ||
width: fit-content; | ||
`; | ||
|
||
const Filters: React.FC = () => { | ||
const theme = useTheme(); | ||
return ( | ||
<Container> | ||
<DropdownSelect | ||
smallButton | ||
simpleButton | ||
items={[ | ||
{ value: 0, text: "All Cases", dot: theme.primaryText }, | ||
{ value: 1, text: "In Progress", dot: theme.primaryBlue }, | ||
{ value: 2, text: "Closed", dot: theme.primaryPurple }, | ||
{ value: 3, text: "Appeal", dot: theme.tint }, | ||
]} | ||
defaultValue={0} | ||
callback={() => {}} | ||
/> | ||
<DropdownSelect | ||
smallButton | ||
simpleButton | ||
items={[ | ||
{ value: 0, text: "Newest" }, | ||
{ value: 1, text: "Oldest" }, | ||
]} | ||
defaultValue={0} | ||
callback={() => {}} | ||
/> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Filters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import { Searchbar, DropdownCascader } from "@kleros/ui-components-library"; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 8px; | ||
`; | ||
|
||
const StyledSearchbar = styled(Searchbar)` | ||
flex: 1; | ||
flex-basis: 310px; | ||
input { | ||
font-size: 16px; | ||
height: 45px; | ||
padding-top: 0px; | ||
padding-bottom: 0px; | ||
} | ||
`; | ||
|
||
const Search: React.FC = () => ( | ||
<Container> | ||
<StyledSearchbar /> | ||
<DropdownCascader | ||
placeholder={"Select Court"} | ||
onSelect={() => { | ||
// Called with the item value when select is clicked | ||
}} | ||
items={[ | ||
{ | ||
label: "General Court", | ||
value: 0, | ||
children: [ | ||
{ | ||
label: "Blockchain", | ||
value: 1, | ||
children: [ | ||
{ | ||
label: "Technical", | ||
value: 2, | ||
}, | ||
{ | ||
label: "Non-technical", | ||
value: 3, | ||
}, | ||
{ | ||
label: "Other", | ||
value: 4, | ||
}, | ||
], | ||
}, | ||
{ | ||
label: "Marketing Services", | ||
value: 5, | ||
}, | ||
], | ||
}, | ||
]} | ||
/> | ||
</Container> | ||
); | ||
|
||
export default Search; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const FieldWrapper = styled.div` | ||
display: inline-flex; | ||
gap: 8px; | ||
`; | ||
|
||
const Field: React.FC<{ label: string; value: string }> = ({ | ||
label, | ||
value, | ||
}) => ( | ||
<FieldWrapper> | ||
<label>{label}</label> | ||
<small>{value}</small> | ||
</FieldWrapper> | ||
); | ||
|
||
const SeparatorLabel = styled.label` | ||
margin-left: 8px; | ||
margin-right: 8px; | ||
`; | ||
|
||
const Separator: React.FC = () => <SeparatorLabel>|</SeparatorLabel>; | ||
|
||
const fields = [ | ||
{ label: "Total", value: "600" }, | ||
{ label: "In Progress", value: "50" }, | ||
{ label: "Closed", value: "550" }, | ||
]; | ||
|
||
const Stats: React.FC = () => ( | ||
<div> | ||
{fields.map(({ label, value }, i) => ( | ||
<> | ||
<Field key={i} {...{ label, value }} /> | ||
{i + 1 < fields.length ? <Separator /> : null} | ||
</> | ||
))} | ||
</div> | ||
); | ||
|
||
export default Stats; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import Filters from "./Filters"; | ||
import Stats from "./Stats"; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 8px; | ||
margin-top: 8px; | ||
`; | ||
|
||
const StatsAndFilters: React.FC = () => ( | ||
<Container> | ||
<Stats /> | ||
<Filters /> | ||
</Container> | ||
); | ||
|
||
export default StatsAndFilters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import Search from "./Search"; | ||
import StatsAndFilters from "./StatsAndFilters"; | ||
import CasesMatrix from "./CasesMatrix"; | ||
|
||
const Container = styled.div` | ||
width: 100%; | ||
height: auto; | ||
background-color: ${({ theme }) => theme.lightBackground}; | ||
padding: 32px; | ||
`; | ||
|
||
const StyledHR = styled.hr` | ||
margin-top: 24px; | ||
margin-bottom: 24px; | ||
`; | ||
|
||
const Cases: React.FC = () => ( | ||
<Container> | ||
<h1>Cases</h1> | ||
<Search /> | ||
<StatsAndFilters /> | ||
<StyledHR /> | ||
<CasesMatrix /> | ||
</Container> | ||
); | ||
|
||
export default Cases; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters