-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1c48c5
commit 16180fa
Showing
5 changed files
with
44 additions
and
26 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
web/beacon-app/src/components/common/Checkbox/Checkbox.tsx
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,26 @@ | ||
export interface CheckboxProps { | ||
onClick?: () => void; | ||
containerClassName?: string; | ||
id?: string; | ||
label: string; | ||
dataCy?: string; | ||
} | ||
|
||
function Checkbox({ onClick, containerClassName, id, label, dataCy }: CheckboxProps) { | ||
return ( | ||
<div className={containerClassName}> | ||
<input | ||
type="checkbox" | ||
id={id} | ||
className="border-2 border-gray-600" | ||
onChange={onClick} | ||
data-cy={dataCy} | ||
/> | ||
<label htmlFor={id} className="ml-2"> | ||
{label} | ||
</label> | ||
</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