fix: examples

This commit is contained in:
Ibrahima G. Coulibaly
2025-02-27 02:21:08 +00:00
parent f08bce84b0
commit a713690882
6 changed files with 164 additions and 84 deletions

View File

@@ -4,7 +4,7 @@ import { IconifyIcon } from '@iconify/react';
interface ToolOptions {
path: string;
component: LazyExoticComponent<JSXElementConstructor<NonNullable<unknown>>>;
component: LazyExoticComponent<JSXElementConstructor<ToolComponentProps>>;
keywords: string[];
icon?: IconifyIcon | string;
name: string;
@@ -25,6 +25,10 @@ export interface DefinedTool {
component: () => JSX.Element;
}
export interface ToolComponentProps {
title?: any;
}
export const defineTool = (
basePath: ToolCategory,
options: ToolOptions
@@ -55,7 +59,7 @@ export const defineTool = (
icon={icon}
type={basePath}
>
<Component />
<Component title={name} />
</ToolLayout>
);
}