|
|
|
@ -15,7 +15,8 @@ export function randomString(length: number) {
|
|
|
|
|
|
|
|
|
|
|
|
export type IAppBasicProps = {
|
|
|
|
export type IAppBasicProps = {
|
|
|
|
iconType?: 'app' | 'api' | 'dataset'
|
|
|
|
iconType?: 'app' | 'api' | 'dataset'
|
|
|
|
iconUrl?: string
|
|
|
|
icon?: string,
|
|
|
|
|
|
|
|
icon_background?: string,
|
|
|
|
name: string
|
|
|
|
name: string
|
|
|
|
type: string | React.ReactNode
|
|
|
|
type: string | React.ReactNode
|
|
|
|
hoverTip?: string
|
|
|
|
hoverTip?: string
|
|
|
|
@ -41,13 +42,12 @@ const ICON_MAP = {
|
|
|
|
'dataset': <AppIcon innerIcon={DatasetSvg} className='!border-[0.5px] !border-indigo-100 !bg-indigo-25' />
|
|
|
|
'dataset': <AppIcon innerIcon={DatasetSvg} className='!border-[0.5px] !border-indigo-100 !bg-indigo-25' />
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default function AppBasic({ iconUrl, name, type, hoverTip, textStyle, iconType = 'app' }: IAppBasicProps) {
|
|
|
|
export default function AppBasic({ icon, icon_background, name, type, hoverTip, textStyle, iconType = 'app' }: IAppBasicProps) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="flex items-start">
|
|
|
|
<div className="flex items-start">
|
|
|
|
{iconUrl && (
|
|
|
|
{icon && icon_background && (
|
|
|
|
<div className='flex-shrink-0 mr-3'>
|
|
|
|
<div className='flex-shrink-0 mr-3'>
|
|
|
|
{/* <img className="inline-block rounded-lg h-9 w-9" src={iconUrl} alt={name} /> */}
|
|
|
|
<AppIcon icon={icon} background={icon_background}/>
|
|
|
|
{ICON_MAP[iconType]}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
<div className="group">
|
|
|
|
<div className="group">
|
|
|
|
|