-
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.
Merge pull request #1685 from kleros/refactor/revamp-devtools-ruler-ui
refactor(web-devtools): revamp-ruler-ui
- Loading branch information
Showing
8 changed files
with
275 additions
and
127 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React 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 InputContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
`; | ||
|
||
const StyledLabel = styled.label` | ||
word-wrap: break-word; | ||
`; | ||
|
||
const ChangeDeveloper: React.FC = () => { | ||
return ( | ||
<Container> | ||
<Header text="Developer" /> | ||
<InputContainer> | ||
<StyledLabel>Current Developer : 0xbe8d95497E53aB41d5A45CC8def90d0e59b49f99</StyledLabel> | ||
<LabeledInput label="New Developer" /> | ||
</InputContainer> | ||
<Button text="Update" /> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default ChangeDeveloper; |
This file was deleted.
Oops, something went wrong.
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.