mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-17 05:40:35 +00:00
Add showType prop and remove ScrollShadow usage
Added an optional showType prop to NetworkDisplayCardProps in common_card.tsx. Removed the ScrollShadow component and replaced it with a standard div in nav_list.tsx to simplify the layout.
This commit is contained in:
parent
84f0e0f9a0
commit
32d3ff6998
@ -26,6 +26,7 @@ export interface NetworkDisplayCardProps<T extends keyof NetworkType> {
|
|||||||
onEnable: () => Promise<void>;
|
onEnable: () => Promise<void>;
|
||||||
onDelete: () => Promise<void>;
|
onDelete: () => Promise<void>;
|
||||||
onEnableDebug: () => Promise<void>;
|
onEnableDebug: () => Promise<void>;
|
||||||
|
showType?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const NetworkDisplayCard = <T extends keyof NetworkType> ({
|
const NetworkDisplayCard = <T extends keyof NetworkType> ({
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import { Button } from '@heroui/button';
|
|||||||
import { Card, CardBody } from '@heroui/card';
|
import { Card, CardBody } from '@heroui/card';
|
||||||
import { Input } from '@heroui/input';
|
import { Input } from '@heroui/input';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { ScrollShadow } from "@heroui/scroll-shadow";
|
|
||||||
import { motion } from 'motion/react';
|
import { motion } from 'motion/react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { TbApi, TbLayoutSidebarLeftCollapseFilled, TbSearch } from 'react-icons/tb';
|
import { TbApi, TbLayoutSidebarLeftCollapseFilled, TbSearch } from 'react-icons/tb';
|
||||||
@ -74,7 +73,7 @@ const OneBotApiNavList: React.FC<OneBotApiNavListProps> = (props) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ScrollShadow className='flex-1 p-3 flex flex-col gap-2 overflow-y-auto scroll-smooth' size={40}>
|
<div className='flex-1 p-3 flex flex-col gap-2 overflow-y-auto scroll-smooth'>
|
||||||
{Object.entries(data).map(([apiName, api]) => {
|
{Object.entries(data).map(([apiName, api]) => {
|
||||||
const isMatch = apiName.toLowerCase().includes(searchValue.toLowerCase()) ||
|
const isMatch = apiName.toLowerCase().includes(searchValue.toLowerCase()) ||
|
||||||
api.description?.toLowerCase().includes(searchValue.toLowerCase());
|
api.description?.toLowerCase().includes(searchValue.toLowerCase());
|
||||||
@ -120,7 +119,7 @@ const OneBotApiNavList: React.FC<OneBotApiNavListProps> = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</ScrollShadow>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user