Skip to content

Commit

Permalink
Merge pull request #507 from chuyun/feature/eoi-fix
Browse files Browse the repository at this point in the history
fix: the eoi component displays an exception under the block type
  • Loading branch information
transitive-bullshit authored Oct 3, 2024
2 parents c862db0 + 5cfdd6f commit b6afe49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/react-notion-x/src/components/eoi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ export const EOI: React.FC<{

<div className='notion-external-description'>
<div className='notion-external-title'>{title}</div>

{(owner || lastUpdated) && (
{!inline && owner ? (
<div className='notion-external-block-desc'>
{owner}
{lastUpdated && <span></span>}
{lastUpdated && `Updated ${lastUpdated}`}
</div>
) : null}
{inline && (owner || lastUpdated) && (
<MentionPreviewCard
title={title}
owner={owner}
Expand Down
7 changes: 7 additions & 0 deletions packages/react-notion-x/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2729,6 +2729,13 @@ svg.notion-page-icon {
color: var(--fg-color-3);
}

.notion-external-block-desc {
color: rgba(55, 53, 47, 0.65);
font-size: 12px;
white-space: nowrap;
padding-top: 4px;
}

.notion-external-mention .notion-external-subtitle {
display: none;
position: absolute;
Expand Down

0 comments on commit b6afe49

Please sign in to comment.