import React from 'react' import { InformationCircleIcon, } from '@heroicons/react/24/outline' import Tooltip from '../base/tooltip' import AppIcon from '../base/app-icon' import { randomString } from '@/utils' export type IAppBasicProps = { iconType?: 'app' | 'api' | 'dataset' | 'webapp' | 'notion' icon?: string icon_background?: string name: string type: string | React.ReactNode hoverTip?: string textStyle?: { main?: string; extra?: string } isExtraInLine?: boolean mode?: string } const ApiSvg = const DatasetSvg = const WebappSvg = const NotionSvg = const ICON_MAP = { app: , api: , dataset: , webapp: , notion: , } export default function AppBasic({ icon, icon_background, name, type, hoverTip, textStyle, mode = 'expand', iconType = 'app' }: IAppBasicProps) { return (
{icon && icon_background && iconType === 'app' && (
)} {iconType !== 'app' &&
{ICON_MAP[iconType]}
} {mode === 'expand' &&
{name} {hoverTip && }
{type}
}
) }