-
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.
refactor(web-devtools): revamp-ruler-ui
- Loading branch information
1 parent
61c07b9
commit bd68a9b
Showing
7 changed files
with
254 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const Container = styled.h2` | ||
border-bottom: 1px solid ${({ theme }) => theme.klerosUIComponentsStroke}; | ||
padding: 8px 0px; | ||
`; | ||
|
||
const Header: React.FC<{ text: string }> = ({ text }) => <Container>{text}</Container>; | ||
|
||
export default Header; |
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,56 @@ | ||
import React, { useState } from "react"; | ||
import styled from "styled-components"; | ||
|
||
import { Button } from "@kleros/ui-components-library"; | ||
|
||
import LabeledInput from "components/LabeledInput"; | ||
|
||
import Header from "./Header"; | ||
|
||
const Container = styled.div` | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 32px; | ||
`; | ||
|
||
const SelectContainer = styled.div` | ||
display: flex; | ||
gap: 16px; | ||
justify-content: space-around; | ||
flex-wrap: wrap; | ||
`; | ||
|
||
const ManualRuling: React.FC = () => { | ||
const [tie, setTie] = useState<boolean>(false); | ||
const [overriden, setOverriden] = useState<boolean>(false); | ||
const [disputeId, setDisputeId] = useState<number>(); | ||
const [ruling, setRuling] = useState<number>(); | ||
|
||
return ( | ||
<Container> | ||
<Header text="Manual Ruling" /> | ||
<SelectContainer> | ||
<LabeledInput | ||
label="Dispute ID" | ||
type="number" | ||
value={disputeId} | ||
onChange={(e) => setDisputeId(Number(e.target.value))} | ||
/> | ||
|
||
<LabeledInput label="Ruling" type="number" value={ruling} onChange={(e) => setRuling(Number(e.target.value))} /> | ||
<LabeledInput label="Tie" inputType="checkbox" checked={tie} onChange={() => setTie((prev) => !prev)} /> | ||
<LabeledInput | ||
label="Overidden" | ||
inputType="checkbox" | ||
checked={overriden} | ||
onChange={() => setOverriden((prev) => !prev)} | ||
/> | ||
</SelectContainer> | ||
|
||
<Button text="Rule" /> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default ManualRuling; |
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
Oops, something went wrong.