Skip to content

Commit

Permalink
fix(editor): display heading icon all time
Browse files Browse the repository at this point in the history
  • Loading branch information
Flrande committed Feb 18, 2025
1 parent 3f4b7ec commit 6c7a596
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions blocksuite/affine/block-paragraph/src/paragraph-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,20 +245,34 @@ export class ParagraphBlockComponent extends CaptionedBlockComponent<

return html`
${style}
<div class="affine-paragraph-block-container">
<style>
.affine-paragraph-block-container[data-has-collapsed-siblings='false']
affine-paragraph-heading-icon
.heading-icon {
transform: translateX(-48px);
}
</style>
<div
class="affine-paragraph-block-container"
data-has-collapsed-siblings="${collapsedSiblings.length > 0}"
>
<div
class=${classMap({
'affine-paragraph-rich-text-wrapper': true,
[type$.value]: true,
[TOGGLE_BUTTON_PARENT_CLASS]: true,
})}
>
${this.model.type$.value.startsWith('h') &&
collapsedSiblings.length > 0
${this.model.type$.value.startsWith('h')
? html`
<affine-paragraph-heading-icon
.model=${this.model}
></affine-paragraph-heading-icon>
`
: nothing}
${this.model.type$.value.startsWith('h') &&
collapsedSiblings.length > 0
? html`
<blocksuite-toggle-button
.collapsed=${collapsed}
.updateCollapsed=${(value: boolean) => {
Expand Down

0 comments on commit 6c7a596

Please sign in to comment.