Merge pull request #959 from hongzzz/fix-notion-icon

fix: notion icon support base64
This commit is contained in:
tangly1024
2023-04-06 09:45:23 +08:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -8,10 +8,10 @@ const NotionIcon = ({ icon }) => {
return <></> return <></>
} }
if (icon.startsWith('http')) { if (icon.startsWith('http') || icon.startsWith('data:')) {
// return <Image src={icon} width={30} height={30}/> // return <Image src={icon} width={30} height={30}/>
// eslint-disable-next-line @next/next/no-img-element // eslint-disable-next-line @next/next/no-img-element
return <img src={icon} className='w-8 float-left mr-1'/> return <img src={icon} className='w-8 inline mr-1'/>
} }
return <span className='mr-1'>{icon}</span> return <span className='mr-1'>{icon}</span>

View File

@@ -714,6 +714,7 @@ svg.notion-page-icon {
/* height: 100%; */ /* height: 100%; */
height: auto !important; height: auto !important;
max-height: 100%; max-height: 100%;
margin: auto;
} }
.notion-asset-wrapper iframe { .notion-asset-wrapper iframe {