Add console devices UI
Add org admin device management, employee self-service enrollment, posture views, and owner assignment across console routes. Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
@@ -32,6 +32,7 @@ import {
|
||||
Value,
|
||||
Viewport,
|
||||
} from "@radix-ui/react-select";
|
||||
import { clsx } from "clsx";
|
||||
import {
|
||||
Children,
|
||||
type ComponentProps,
|
||||
@@ -211,12 +212,21 @@ export function Select<T>({
|
||||
);
|
||||
}
|
||||
|
||||
export function Option({ children, ...props }: ComponentProps<typeof Item>) {
|
||||
export function Option({
|
||||
children,
|
||||
className,
|
||||
...props
|
||||
}: ComponentProps<typeof Item>) {
|
||||
const hasSingleChildren = Children.count(children) <= 1;
|
||||
return (
|
||||
<Item
|
||||
{...props}
|
||||
className="flex gap-2 items-center min-h-8 py-1 text-sm font-medium text-txt-primary hover:bg-tertiary-hover active:bg-tertiary-pressed cursor-pointer px-[10px] text-start"
|
||||
className={clsx(
|
||||
"flex gap-2 items-center min-h-8 py-1 text-sm font-medium text-txt-primary outline-none cursor-pointer px-[10px] text-start",
|
||||
"data-[highlighted]:bg-tertiary-hover data-[highlighted]:outline-none",
|
||||
"active:bg-tertiary-pressed",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<ItemText asChild>
|
||||
<span
|
||||
|
||||
@@ -72,6 +72,7 @@ type Props = {
|
||||
className?: string;
|
||||
ref?: DialogRef;
|
||||
onClose?: () => void;
|
||||
onOpenChange?: (open: boolean) => void;
|
||||
closable?: boolean;
|
||||
};
|
||||
|
||||
@@ -89,6 +90,7 @@ export function Dialog({
|
||||
ref,
|
||||
defaultOpen,
|
||||
onClose,
|
||||
onOpenChange: onOpenChangeProp,
|
||||
closable = true,
|
||||
}: Props) {
|
||||
const { overlay, content, header, title: titleClassname } = dialog();
|
||||
@@ -100,9 +102,11 @@ export function Dialog({
|
||||
ref.current = {
|
||||
open() {
|
||||
setOpen(true);
|
||||
onOpenChangeProp?.(true);
|
||||
},
|
||||
close() {
|
||||
setOpen(false);
|
||||
onOpenChangeProp?.(false);
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -113,6 +117,7 @@ export function Dialog({
|
||||
return;
|
||||
}
|
||||
setOpen(open);
|
||||
onOpenChangeProp?.(open);
|
||||
if (!open) {
|
||||
onClose?.();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user