File tree Expand file tree Collapse file tree 2 files changed +2
-25
lines changed
custom-implementation/src Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Original file line number Diff line number Diff line change 1
1
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2
2
export const ThemeSwitch = ( ) => {
3
- return (
4
- < >
5
- < button className = "fern-search-bar w-full" >
6
- < span className = "search-placeholder" >
7
- < svg
8
- width = "15"
9
- height = "15"
10
- viewBox = "0 0 15 15"
11
- fill = "none"
12
- xmlns = "http://www.w3.org/2000/svg"
13
- className = "size-5" >
14
- < path
15
- d = "M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z"
16
- fill = "currentColor"
17
- fill-rule = "evenodd"
18
- clip-rule = "evenodd" > </ path >
19
- </ svg >
20
- < span > Search...</ span >
21
- </ span >
22
- < span className = "keyboard-shortcut-hint" > /</ span >
23
- </ button >
24
- hello
25
- </ >
26
- )
3
+ return < > hello</ >
27
4
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ const render = async () => {
41
41
)
42
42
43
43
// console.log('sibling', search, search?.parentNode)
44
- ReactDOM . render ( React . createElement ( ThemeSwitch ) , sidenav )
44
+ ReactDOM . createPortal ( React . createElement ( ThemeSwitch ) , sidenav )
45
45
}
46
46
47
47
let observations = 0
You can’t perform that action at this time.
0 commit comments