feat: implement UUID generator tool and refactor tool structure
- Added a new Tool interface to define the structure of tools. - Introduced a UUID generator tool with a corresponding component and icon. - Refactored the tools array to include the new UUID generator tool.
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
interface Tool {
|
||||
name: string;
|
||||
description: string;
|
||||
icon: React.ReactNode;
|
||||
component: React.ReactNode;
|
||||
}
|
||||
import { Hash } from 'lucide-react'
|
||||
|
||||
export const tools: Tool[] = [];
|
||||
import type { Tool } from "./type";
|
||||
import { UUID } from './uuid'
|
||||
|
||||
export const tools: Tool[] = [
|
||||
{
|
||||
path: "uuid",
|
||||
name: "UUID Generator",
|
||||
description: "Generate a UUID",
|
||||
icon: <Hash />,
|
||||
component: <UUID />,
|
||||
}
|
||||
];
|
||||
9
src/components/tool/type.ts
Normal file
9
src/components/tool/type.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
export interface Tool {
|
||||
path: string;
|
||||
name: string;
|
||||
icon: ReactNode;
|
||||
description: string;
|
||||
component: ReactNode;
|
||||
}
|
||||
3
src/components/tool/uuid.tsx
Normal file
3
src/components/tool/uuid.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { FC } from "react";
|
||||
|
||||
export const UUID: FC = () => <div>UUID</div>
|
||||
Reference in New Issue
Block a user