@@ -17,7 +17,10 @@ Defined in: [context/devtools-context.tsx:15](https://github.com/TanStack/devtoo
1717optional id : string ;
1818```
1919
20- Defined in: [ context/devtools-context.tsx:17] ( https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L17 )
20+ Defined in: [ context/devtools-context.tsx:47] ( https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L47 )
21+
22+ Unique identifier for the plugin.
23+ If not provided, it will be generated based on the name.
2124
2225***
2326
@@ -27,7 +30,32 @@ Defined in: [context/devtools-context.tsx:17](https://github.com/TanStack/devtoo
2730name : string | (el ) => void ;
2831```
2932
30- Defined in: [ context/devtools-context.tsx:16] ( https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L16 )
33+ Defined in: [ context/devtools-context.tsx:42] ( https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L42 )
34+
35+ Name to be displayed in the devtools UI.
36+ If a string, it will be used as the plugin name.
37+ If a function, it will be called with the mount element.
38+
39+ Example:
40+ ``` ts
41+ {
42+ // If a string, it will be used as the plugin name
43+ name : " Your Plugin" ,
44+ render : () => {}
45+ }
46+ ```
47+ or
48+
49+ ``` ts
50+ {
51+ // If a function, it will be called with the mount element
52+ name : (el ) => {
53+ el .innerText = " Your Plugin Name"
54+ // Your name logic here
55+ },
56+ render : () => {}
57+ }
58+ ```
3159
3260***
3361
@@ -37,14 +65,28 @@ Defined in: [context/devtools-context.tsx:16](https://github.com/TanStack/devtoo
3765render : (el ) => void ;
3866```
3967
40- Defined in: [ context/devtools-context.tsx:18] ( https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L18 )
68+ Defined in: [ context/devtools-context.tsx:61] ( https://github.com/TanStack/devtools/blob/main/packages/devtools/src/context/devtools-context.tsx#L61 )
69+
70+ Render the plugin UI by using the provided element. This function will be called
71+ when the plugin tab is clicked and expected to be mounted.
4172
4273#### Parameters
4374
4475##### el
4576
4677` HTMLDivElement `
4778
79+ The mount element for the plugin.
80+
4881#### Returns
4982
5083` void `
84+
85+ void
86+
87+ Example:
88+ ``` ts
89+ render : (el ) => {
90+ el .innerHTML = " <h1>Your Plugin</h1>"
91+ }
92+ ```
0 commit comments