| 5 | |
| 6 | export interface DevtoolsPanelProps extends TanStackDevtoolsPluginProps {} |
| 7 | |
| 8 | export function createSveltePanel< |
| 9 | TComponentProps extends DevtoolsPanelProps, |
| 10 | TCoreDevtoolsClass extends { |
| 11 | mount: (el: HTMLElement, props: TComponentProps) => void |
| 12 | unmount: () => void |
| 13 | }, |
| 14 | >( |
| 15 | CoreClass: new () => TCoreDevtoolsClass, |
| 16 | ): [Component<TComponentProps>, Component<TComponentProps>] { |
| 17 | const Panel: Component<TComponentProps> = (internals, props) => |
| 18 | DevtoolsPanel(internals, { |
| 19 | CoreClass, |
| 20 | pluginProps: props, |
| 21 | }) |
| 22 | |
| 23 | return [Panel, NoOp] |
| 24 | } |