Path: blob/master/src/packages/frontend/compute/display-cloud.tsx
1503 views
import type { Cloud as CloudType } from "@cocalc/util/db-schema/compute-servers";1import { CLOUDS_BY_NAME } from "@cocalc/util/compute/cloud/clouds";2import { Icon, isIconName } from "@cocalc/frontend/components/icon";34interface Props {5cloud: CloudType;6height?: number | string;7style?;8}910export default function DisplayCloud({ cloud, height, style }: Props) {11const x = CLOUDS_BY_NAME[cloud];12let label;13if (x?.image) {14label = <img src={x.image} height={height ?? 18} alt={x.label} />;15} else {16label = x?.label ?? cloud ?? "No Cloud Configured";17}18return (19<span style={style}>20{x?.icon && isIconName(x.icon) && <Icon name={x.icon} style={{ marginRight: "5px" }} />}21{label}22</span>23);24}252627