Skip to content

Commit

Permalink
fixed buttons and input box
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Zheng committed Apr 12, 2024
1 parent 98a398d commit 8a097d6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
21 changes: 12 additions & 9 deletions components/judges/ScoreInput.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Slider, Radio , InputNumber, Row, Col } from 'antd';
import { RadioChangeEvent } from 'antd/lib';
import { IntegerType } from 'mongodb';
import styles from '../../styles/Judge.module.css';
import React from 'react';


interface ScoreInputProps {
value: number;
onChange: (value: number | null) => void;
Expand All @@ -16,15 +19,15 @@ export default function ScoreInput(props: ScoreInputProps) {

return (
<Row>
<Col span={20}>
<Radio.Group onChange={onRadioChange} value={value}>
<Radio style={{marginRight: '20px'}} value={1}>1</Radio>
<Radio style={{marginRight: '20px'}} value={2}>2</Radio>
<Radio style={{marginRight: '20px'}} value={3}>3</Radio>
<Radio style={{marginRight: '20px'}} value={4}>4</Radio>
<Radio style={{marginRight: '20px'}} value={5}>5</Radio>
<Radio style={{marginRight: '20px'}} value={6}>6</Radio>
<Radio value={7}>7</Radio>
<Col flex={1/4}>
<Radio.Group onChange={onRadioChange} value={value} style={{display: 'flex', flexDirection: 'row', alignItems:'center'}}>
<Radio className={styles.CustomRadio} value={1}>1</Radio>
<Radio className={styles.CustomRadio} value={2}>2</Radio>
<Radio className={styles.CustomRadio} value={3}>3</Radio>
<Radio className={styles.CustomRadio} value={4}>4</Radio>
<Radio className={styles.CustomRadio} value={5}>5</Radio>
<Radio className={styles.CustomRadio} value={6}>6</Radio>
<Radio className={styles.CustomRadio} value={7}>7</Radio>
</Radio.Group>

</Col>
Expand Down
8 changes: 8 additions & 0 deletions styles/Judge.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,11 @@
.reportABugText:hover {
cursor: pointer;
}

.CustomRadio {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 20px;

}

0 comments on commit 8a097d6

Please sign in to comment.