Skip to content

Commit 376b155

Browse files
committed
client: added a new option input field
1 parent bc57ae9 commit 376b155

15 files changed

+92
-30
lines changed

client/build/asset-manifest.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/css/main.d214021f.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

client/build/static/css/main.f9eed45e.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/css/main.d214021f.css.map renamed to client/build/static/css/main.f9eed45e.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/js/main.469cfcd7.js renamed to client/build/static/js/main.9a4f379f.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/js/main.469cfcd7.js.map renamed to client/build/static/js/main.9a4f379f.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/atoms.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ export const alignState = atom({
2121
default: "left",
2222
});
2323

24+
export const borderState = atom({
25+
key: "border",
26+
default: true,
27+
});
28+
2429
export const linesState = atom({
2530
key: "lines",
2631
default: [] as Line[],
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { Dispatch, FC, SetStateAction } from "react";
2+
3+
interface TrueFalseInputProps {
4+
label: string;
5+
value: boolean;
6+
setValue: Dispatch<SetStateAction<boolean>>;
7+
}
8+
9+
const TrueFalseInput: FC<TrueFalseInputProps> = (props) => {
10+
return (
11+
<div className="flex items-center gap-2 mx-4">
12+
<label className="text-gh-text-secondary whitespace-nowrap font-semibold">
13+
{props.label}:
14+
</label>
15+
16+
<div
17+
className="w-[72%] ml-auto text-base bg-gh-bg border border-solid border-gh-border
18+
rounded-md py-1 leading-none text-gh-text outline-none flex items-center
19+
justify-evenly"
20+
>
21+
<div
22+
onClick={() => props.setValue(true)}
23+
className={`py-1 px-4 border border-solid border-gh-border rounded-md
24+
cursor-pointer transition-all duration-150 hover:text-green-400
25+
hover:border-gh-button-border-active hover:bg-gh-button ${
26+
props.value ? "text-green-400 bg-gh-button" : ""
27+
}`}
28+
>
29+
True
30+
</div>
31+
32+
<div
33+
onClick={() => props.setValue(false)}
34+
className={`py-1 px-4 border border-solid border-gh-border rounded-md
35+
cursor-pointer transition-all duration-150 hover:text-red-400
36+
hover:border-gh-button-border-active hover:bg-gh-button ${
37+
!props.value ? "text-red-400 bg-gh-button" : ""
38+
}`}
39+
>
40+
False
41+
</div>
42+
</div>
43+
</div>
44+
);
45+
};
46+
47+
export default TrueFalseInput;

0 commit comments

Comments
 (0)