Skip to content

Commit b6afe49

Browse files
Merge pull request #507 from chuyun/feature/eoi-fix
fix: the eoi component displays an exception under the block type
2 parents c862db0 + 5cfdd6f commit b6afe49

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

packages/react-notion-x/src/components/eoi.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,14 @@ export const EOI: React.FC<{
6363

6464
<div className='notion-external-description'>
6565
<div className='notion-external-title'>{title}</div>
66-
67-
{(owner || lastUpdated) && (
66+
{!inline && owner ? (
67+
<div className='notion-external-block-desc'>
68+
{owner}
69+
{lastUpdated && <span></span>}
70+
{lastUpdated && `Updated ${lastUpdated}`}
71+
</div>
72+
) : null}
73+
{inline && (owner || lastUpdated) && (
6874
<MentionPreviewCard
6975
title={title}
7076
owner={owner}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2729,6 +2729,13 @@ svg.notion-page-icon {
27292729
color: var(--fg-color-3);
27302730
}
27312731

2732+
.notion-external-block-desc {
2733+
color: rgba(55, 53, 47, 0.65);
2734+
font-size: 12px;
2735+
white-space: nowrap;
2736+
padding-top: 4px;
2737+
}
2738+
27322739
.notion-external-mention .notion-external-subtitle {
27332740
display: none;
27342741
position: absolute;

0 commit comments

Comments
 (0)