mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
feat(sidebar): implement new design [EE-3447] (#7118)
This commit is contained in:
parent
e5e57978af
commit
ed8f9b5931
54 changed files with 1928 additions and 857 deletions
20
app/react/portainer/environments/utils/get-platform-icon.ts
Normal file
20
app/react/portainer/environments/utils/get-platform-icon.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { getPlatformType } from '@/portainer/environments/utils';
|
||||
import { EnvironmentType, PlatformType } from '@/portainer/environments/types';
|
||||
|
||||
import Docker from './docker.svg?c';
|
||||
import Azure from './azure.svg?c';
|
||||
import Kubernetes from './kubernetes.svg?c';
|
||||
|
||||
const icons: {
|
||||
[key in PlatformType]: SvgrComponent;
|
||||
} = {
|
||||
[PlatformType.Docker]: Docker,
|
||||
[PlatformType.Kubernetes]: Kubernetes,
|
||||
[PlatformType.Azure]: Azure,
|
||||
};
|
||||
|
||||
export function getPlatformIcon(type: EnvironmentType) {
|
||||
const platform = getPlatformType(type);
|
||||
|
||||
return icons[platform];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue