Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

View File

@@ -0,0 +1,40 @@
'use client';
import * as React from 'react';
import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
const { useRef, useEffect } = React;
/**
* @deprecated migrated to \@fluentui\-contrib/react\-virtualizer for stable release.
*/ export const useMutationObserver = (target, callback, options)=>{
'use no memo';
// TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286
const observer = useRef(undefined);
const { targetDocument } = useFluent();
const win = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
useEffect(()=>{
if (!win) {
return;
}
// Create an observer instance linked to the callback function
observer.current = new win.MutationObserver(callback);
}, [
callback,
win
]);
useEffect(()=>{
if (target) {
var // Start observing the target node for configured mutations
_observer_current;
(_observer_current = observer.current) === null || _observer_current === void 0 ? void 0 : _observer_current.observe(target, options);
}
return ()=>{
var _observer_current;
(_observer_current = observer.current) === null || _observer_current === void 0 ? void 0 : _observer_current.disconnect();
};
}, [
target,
options
]);
return {
observer
};
};