Skip to content

Commit 49043c0

Browse files
committed
fix: display page icons in collection list view
1 parent a21f374 commit 49043c0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/react-notion-x/src/styles.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,8 @@ svg.notion-page-icon {
16571657
}
16581658

16591659
.notion-list-item-title {
1660+
display: flex;
1661+
align-items: center;
16601662
white-space: nowrap;
16611663
overflow: hidden;
16621664
text-overflow: ellipsis;

packages/react-notion-x/src/third-party/collection-view-list.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type * as types from 'notion-types'
22
import type * as React from 'react'
33
import { type PageBlock } from 'notion-types'
44

5+
import { PageIcon } from '../components/page-icon'
56
import { useNotionContext } from '../context'
67
import { type CollectionViewProps } from '../types'
78
import { CollectionGroup } from './collection-group'
@@ -72,6 +73,11 @@ function List({
7273
key={blockId}
7374
>
7475
<div className='notion-list-item-title'>
76+
<PageIcon
77+
block={block}
78+
className='notion-page-title-icon'
79+
hideDefaultIcon
80+
/>
7581
<Property
7682
schema={titleSchema}
7783
data={titleData}

0 commit comments

Comments
 (0)