chore: gpu selector, source dropdown

This commit is contained in:
jialin
2025-02-17 13:49:55 +08:00
parent f6bbbc56ba
commit 35a5733e82
12 changed files with 221 additions and 97 deletions
@@ -0,0 +1,27 @@
import React from 'react';
import '../style/deploy-dropdown.less';
interface DeployDropdownProps {
items: { label: string; value: string; key: string; icon: React.ReactNode }[];
onSelect: (item: {
label: string;
value: string;
key: string;
icon: React.ReactNode;
}) => void;
}
const DeployDropdown: React.FC<DeployDropdownProps> = ({ items, onSelect }) => {
return (
<div className="deploy-dropdown">
{items.map((item) => (
<div key={item.key} onClick={() => onSelect(item)} className="item">
<span className="icon">{item.icon}</span>
<span className="label">{item.label}</span>
</div>
))}
</div>
);
};
export default DeployDropdown;