wwf
2 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/base/notion-icon/index.tsx
@@ -1,4 +1,4 @@
import { RiFileTextLine } from '@remixicon/react'
import s from './index.module.css'
import cn from '@/utils/classnames'
import type { DataSourceNotionPage } from '@/models/common'
@@ -22,16 +22,16 @@
          <img
            alt='workspace icon'
            src={src}
            className={cn('block h-5 w-5 object-cover', className)}
            className={cn('block object-cover w-5 h-5', className)}
          />
        )
      }
      return (
        <div className={cn('flex h-5 w-5 items-center justify-center', className)}>{src}</div>
        <div className={cn('flex items-center justify-center w-5 h-5', className)}>{src}</div>
      )
    }
    return (
      <div className={cn('flex h-5 w-5 items-center justify-center rounded bg-gray-200 text-xs font-medium text-gray-500', className)}>{name?.[0].toLocaleUpperCase()}</div>
      <div className={cn('flex items-center justify-center w-5 h-5 bg-gray-200 text-xs font-medium text-gray-500 rounded', className)}>{name?.[0].toLocaleUpperCase()}</div>
    )
  }
@@ -41,17 +41,17 @@
        <img
          alt='page icon'
          src={src.url || ''}
          className={cn('block h-5 w-5 object-cover', className)}
          className={cn('block object-cover w-5 h-5', className)}
        />
      )
    }
    return (
      <div className={cn('flex h-5 w-5 items-center justify-center', className)}>{src?.emoji}</div>
      <div className={cn('flex items-center justify-center w-5 h-5', className)}>{src?.emoji}</div>
    )
  }
  return (
    <RiFileTextLine className={cn('h-5 w-5 text-text-tertiary', className)} />
    <div className={cn(s['default-page-icon'], className)} />
  )
}