|
| 1 | +import React, { useState } from "react"; |
| 2 | +import styled from "styled-components"; |
| 3 | + |
| 4 | +import { Checkbox, Field } from "@kleros/ui-components-library"; |
| 5 | + |
| 6 | +import LightButton from "components/LightButton"; |
| 7 | + |
| 8 | +const Container = styled.div` |
| 9 | + display: flex; |
| 10 | + flex-wrap: wrap; |
| 11 | + gap: 8px; |
| 12 | + margin: 16px 0; |
| 13 | + border: ${({ theme }) => theme.klerosUIComponentsPrimaryBlue} 1px solid; |
| 14 | + border-radius: 4px; |
| 15 | + padding: 16px; |
| 16 | +`; |
| 17 | +const RulingSettings = styled.div` |
| 18 | + display: flex; |
| 19 | + flex-direction: column; |
| 20 | + gap: 8px; |
| 21 | + margin: 16px 0; |
| 22 | +`; |
| 23 | +const FieldContainer = styled.div` |
| 24 | + display: flex; |
| 25 | + align-items: center; |
| 26 | + width: fit-content; |
| 27 | + height: fit-content; |
| 28 | + padding-left: 8px; |
| 29 | + gap: 8px; |
| 30 | + font-size: 14px; |
| 31 | + border-radius: 4px; |
| 32 | + border: ${({ theme }) => theme.klerosUIComponentsStroke} 1px solid; |
| 33 | + color: ${({ theme }) => theme.klerosUIComponentsPrimaryText}; |
| 34 | +`; |
| 35 | + |
| 36 | +const RulingModes: React.FC = () => { |
| 37 | + const [tie, setTie] = useState<boolean>(false); |
| 38 | + const [overriden, setOverriden] = useState<boolean>(false); |
| 39 | + |
| 40 | + return ( |
| 41 | + <div> |
| 42 | + <h3>Ruling Mode</h3> |
| 43 | + <Container> |
| 44 | + <RulingSettings> |
| 45 | + <LightButton text={"Rule Now Manually"} /> |
| 46 | + <FieldContainer> |
| 47 | + ruling <Field placeholder={"1"}></Field> |
| 48 | + </FieldContainer> |
| 49 | + </RulingSettings> |
| 50 | + |
| 51 | + <RulingSettings> |
| 52 | + <LightButton text={"Run Automatically with a Preset"} /> |
| 53 | + <FieldContainer> |
| 54 | + ruling <Field placeholder={"1"}></Field> |
| 55 | + </FieldContainer> |
| 56 | + <FieldContainer> |
| 57 | + <Checkbox label="" small checked={tie} onChange={() => setTie((old) => !old)} /> |
| 58 | + <Field placeholder={"tie"}></Field> |
| 59 | + </FieldContainer> |
| 60 | + <FieldContainer> |
| 61 | + <Checkbox label="" small checked={overriden} onChange={() => setOverriden((old) => !old)} /> |
| 62 | + <Field placeholder={"overriden"}></Field> |
| 63 | + </FieldContainer> |
| 64 | + </RulingSettings> |
| 65 | + |
| 66 | + <RulingSettings> |
| 67 | + <LightButton text={"Run Automatically Randomly"} /> |
| 68 | + </RulingSettings> |
| 69 | + </Container> |
| 70 | + </div> |
| 71 | + ); |
| 72 | +}; |
| 73 | + |
| 74 | +export default RulingModes; |
0 commit comments