mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-09-27 10:06:23 +08:00
refactor: move codes into src folder
This commit is contained in:
21
src/components/EngineIcon.tsx
Normal file
21
src/components/EngineIcon.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
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;
|
Reference in New Issue
Block a user