mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 05:29:08 +08:00
feat(editor): add block button for hovering blocks (#14879)
This PR implements [feature request] #14845 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Add-block control that appears when hovering blocks in page mode to insert and auto-focus a new paragraph; control hides after insertion. * **Improvements** * Improved hover and interaction handling to avoid accidental triggers when interacting with the drag handle or add-block control. * Consistent sizing, positioning, and visibility behavior for the add-block control. * **Style** * Moved heading icon slightly for improved visual alignment. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ export class ParagraphHeadingIcon extends SignalWatcher(
|
||||
margin-top: 0.3em;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
transform: translateX(-64px);
|
||||
transform: translateX(-80px);
|
||||
border-radius: 4px;
|
||||
padding: 2px;
|
||||
cursor: pointer;
|
||||
|
||||
Reference in New Issue
Block a user