mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-28 01:32:09 +08:00
22 lines
486 B
TypeScript
22 lines
486 B
TypeScript
import { Engine } from "@/types";
|
|
import Icon from "./Icon";
|
|
|
|
interface Props {
|
|
className: string;
|
|
engine: Engine;
|
|
}
|
|
|
|
const EngineIcon = (props: Props) => {
|
|
const { className, engine } = props;
|
|
|
|
if (engine === Engine.MySQL) {
|
|
return <Icon.DiMysql className={className} />;
|
|
} else if (engine === Engine.PostgreSQL) {
|
|
return <Icon.DiPostgresql className={className} />;
|
|
} else {
|
|
return <Icon.DiDatabase className={className} />;
|
|
}
|
|
};
|
|
|
|
export default EngineIcon;
|