mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-12-29 16:16:02 +00:00
refact: examples
This commit is contained in:
19
src/components/examples/ExampleOptions.tsx
Normal file
19
src/components/examples/ExampleOptions.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import ToolOptionGroups from '@components/options/ToolOptionGroups';
|
||||
import { GetGroupsType } from '@components/options/ToolOptions';
|
||||
import React from 'react';
|
||||
|
||||
export default function ExampleOptions<T>({
|
||||
options,
|
||||
getGroups
|
||||
}: {
|
||||
options: T;
|
||||
getGroups: GetGroupsType<T>;
|
||||
}) {
|
||||
return (
|
||||
<ToolOptionGroups
|
||||
// @ts-ignore
|
||||
groups={getGroups({ values: options })}
|
||||
vertical
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user