Files
cc-switch/src/components/AddProviderModal.tsx

30 lines
616 B
TypeScript
Raw Normal View History

import React from "react";
import { Provider } from "../types";
import { AppType } from "../lib/tauri-api";
import ProviderForm from "./ProviderForm";
2025-08-04 22:16:26 +08:00
interface AddProviderModalProps {
appType: AppType;
onAdd: (provider: Omit<Provider, "id">) => void;
onClose: () => void;
2025-08-04 22:16:26 +08:00
}
const AddProviderModal: React.FC<AddProviderModalProps> = ({
appType,
onAdd,
onClose,
}) => {
2025-08-04 22:16:26 +08:00
return (
<ProviderForm
appType={appType}
title="添加新供应商"
submitText="添加"
showPresets={true}
onSubmit={onAdd}
onClose={onClose}
/>
);
};
2025-08-04 22:16:26 +08:00
export default AddProviderModal;