-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to add, edit, and delete camera groups in the UI (#10296)
* Add dialog for creating new camera group * Support adding of camera groups and dynamically updating the config * Support deleting and edit existing camera groups * Don't show separator if user has no groups * Formatting * fix background
- Loading branch information
Showing
6 changed files
with
282 additions
and
38 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
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,32 @@ | ||
import { LuCheck } from "react-icons/lu"; | ||
import { Button } from "../ui/button"; | ||
import { IconType } from "react-icons"; | ||
|
||
type FilterCheckBoxProps = { | ||
label: string; | ||
CheckIcon?: IconType; | ||
isChecked: boolean; | ||
onCheckedChange: (isChecked: boolean) => void; | ||
}; | ||
|
||
export default function FilterCheckBox({ | ||
label, | ||
CheckIcon = LuCheck, | ||
isChecked, | ||
onCheckedChange, | ||
}: FilterCheckBoxProps) { | ||
return ( | ||
<Button | ||
className="capitalize flex justify-between items-center cursor-pointer w-full text-primary-foreground" | ||
variant="ghost" | ||
onClick={() => onCheckedChange(!isChecked)} | ||
> | ||
{isChecked ? ( | ||
<CheckIcon className="w-6 h-6" /> | ||
) : ( | ||
<div className="w-6 h-6" /> | ||
)} | ||
<div className="ml-1 w-full flex justify-start">{label}</div> | ||
</Button> | ||
); | ||
} |
Oops, something went wrong.