()
| 27 | } |
| 28 | |
| 29 | export const SystemButtonGroup = () => { |
| 30 | const setDarkMode = useSetDarkMode() |
| 31 | const container = useRef<HTMLDivElement>(null) |
| 32 | const docSearchConfig = useDocSearch() |
| 33 | |
| 34 | useEffect(() => { |
| 35 | if (docsearch && typeof docsearch === 'function' && container.current) { |
| 36 | docsearch({ |
| 37 | ...docSearchConfig, |
| 38 | |
| 39 | container: container.current, |
| 40 | }) |
| 41 | } |
| 42 | }, [docSearchConfig]) |
| 43 | |
| 44 | return ( |
| 45 | <div className="flex gap-6 pl-2 md:gap-2 lg:gap-4 lg:pl-6"> |
| 46 | <SystemButtonItem> |
| 47 | <div id="docsearch" ref={container} /> |
| 48 | </SystemButtonItem> |
| 49 | <a |
| 50 | href="https://github.com/Milkdown/milkdown" |
| 51 | target="_blank" |
| 52 | rel="noreferrer" |
| 53 | > |
| 54 | <SystemButtonItem> |
| 55 | <Github /> |
| 56 | </SystemButtonItem> |
| 57 | </a> |
| 58 | <SystemButtonItem onClick={() => setDarkMode((x) => !x)}> |
| 59 | <div className="material-symbols-outlined">dark_mode</div> |
| 60 | </SystemButtonItem> |
| 61 | </div> |
| 62 | ) |
| 63 | } |
nothing calls this directly
no test coverage detected