File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ import { useIsCollaborationEnabled } from "@/lib/collaboration";
2020export 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 >
You can’t perform that action at this time.
0 commit comments