mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-11-21 12:34:03 +01:00
refactor: use ToolContent
This commit is contained in:
@@ -10,6 +10,7 @@ interface ToolOptions {
|
||||
name: string;
|
||||
description: string;
|
||||
shortDescription: string;
|
||||
longDescription?: string;
|
||||
}
|
||||
|
||||
export type ToolCategory =
|
||||
@@ -32,7 +33,8 @@ export interface DefinedTool {
|
||||
}
|
||||
|
||||
export interface ToolComponentProps {
|
||||
title?: any;
|
||||
title: string;
|
||||
longDescription?: string;
|
||||
}
|
||||
|
||||
export const defineTool = (
|
||||
@@ -46,7 +48,8 @@ export const defineTool = (
|
||||
description,
|
||||
keywords,
|
||||
component,
|
||||
shortDescription
|
||||
shortDescription,
|
||||
longDescription
|
||||
} = options;
|
||||
const Component = component;
|
||||
return {
|
||||
@@ -65,7 +68,7 @@ export const defineTool = (
|
||||
icon={icon}
|
||||
type={basePath}
|
||||
>
|
||||
<Component title={name} />
|
||||
<Component title={name} longDescription={longDescription} />
|
||||
</ToolLayout>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user