Skip to content

Commit 86371ee

Browse files
committed
style(share): Add checkbox
1 parent 982b4a6 commit 86371ee

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

apps/front-end/src/app/DialogCollab.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import { useIsCollaborationEnabled } from "@/lib/collaboration";
2020
export default function DialogCollab() {
2121
const pathname = usePathname();
2222
const fullUrl = `${getOrigin()}${pathname}`;
23-
const [isCollaborationEnabled, setIsCollaborationEnabled] = useIsCollaborationEnabled();
23+
const [isCollaborationEnabled, setIsCollaborationEnabled] =
24+
useIsCollaborationEnabled();
2425
const [open, setOpen] = useState(false);
2526

2627
const copyToClipBoard = () => {
@@ -69,13 +70,12 @@ export default function DialogCollab() {
6970
</>
7071
)}
7172
</div>
72-
<Button
73-
variant={isCollaborationEnabled ? "destructive" : undefined}
74-
size="small"
75-
onClick={toggleSharing}
76-
>
77-
{isCollaborationEnabled ? "Disable" : "Enable"}
78-
</Button>
73+
<input
74+
checked={isCollaborationEnabled}
75+
onChange={toggleSharing}
76+
type="checkbox"
77+
className="grid aspect-video h-8 appearance-none grid-cols-[0fr_1fr] items-center rounded-3xl bg-slate-500 px-1 opacity-50 transition-all before:col-start-2 before:aspect-square before:h-6 before:rounded-full before:bg-slate-400 checked:grid-cols-[1fr_1fr] checked:bg-cyan-800 checked:opacity-100 checked:before:bg-cyan-600"
78+
/>
7979
</div>
8080
</div>
8181
</DialogContent>

0 commit comments

Comments
 (0)