-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: James <[email protected]>
- Loading branch information
James
committed
Dec 8, 2023
1 parent
3bfe32a
commit 14fd13d
Showing
24 changed files
with
493 additions
and
140 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
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,15 @@ | ||
type Props = { | ||
name: string | ||
title: string | ||
checked: boolean | ||
register: any | ||
} | ||
|
||
const Checkbox: React.FC<Props> = ({ name, title, checked, register }) => ( | ||
<div className="flex justify-between"> | ||
<label>{title}</label> | ||
<input type="checkbox" defaultChecked={checked} {...register(name)} /> | ||
</div> | ||
) | ||
|
||
export default Checkbox |
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
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,33 @@ | ||
type Props = { | ||
name: string | ||
title: string | ||
min: number | ||
max: number | ||
step: number | ||
value: number | ||
register: any | ||
} | ||
|
||
const Slider: React.FC<Props> = ({ | ||
name, | ||
title, | ||
min, | ||
max, | ||
step, | ||
value, | ||
register, | ||
}) => ( | ||
<div className="flex flex-col"> | ||
<p>{title}</p> | ||
<input | ||
{...register(name)} | ||
defaultValue={value} | ||
type="range" | ||
min={min} | ||
max={max} | ||
step={step} | ||
/> | ||
</div> | ||
) | ||
|
||
export default Slider |
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.