File tree Expand file tree Collapse file tree 6 files changed +37
-43
lines changed
block-note-editor/_component Expand file tree Collapse file tree 6 files changed +37
-43
lines changed Original file line number Diff line number Diff line change 1
-
2
- .suggestions-menu {
3
- z-index : 100000 ;
4
- }
Original file line number Diff line number Diff line change 1
- < div class ="relative ">
1
+ < div class ="relative py-3 ">
2
2
< bna-formatting-toolbar [editor] ="editor ">
3
3
< div class ="bn-toolbar ">
4
4
< bna-basic-text-style-button
23
23
< bna-drag-handle-menu-btn [editor] ="editor " />
24
24
</ bna-side-menu >
25
25
26
- < bna-view [editor] ="editor " class ="block margin-icons " />
26
+ < bna-view [editor] ="editor " class ="block " />
27
27
< bna-suggestions-menu
28
28
[editor] ="editor "
29
29
class ="z-index-3 "
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ export class BnaSideMenuDirective implements OnChanges {
34
34
this . renderer2 . setStyle (
35
35
this . elRef . nativeElement ,
36
36
'top' ,
37
- sideMenuState . referencePos . top - position . top + 25 + 'px'
37
+ //TODO: change to relative position to view
38
+ sideMenuState . referencePos . top - position . top + 35 + 'px'
38
39
) ;
39
40
}
40
41
// this.toggleVisibility(sideMenuState.show);
Original file line number Diff line number Diff line change 1
- < button
2
- (click) ="openDragMenu() "
3
- (dragend) ="dragEnd() "
4
- (dragstart) ="dragStart($event) "
5
- draggable ="true "
6
- type ="button "
7
- hlmBtn
8
- variant ="ghost "
9
- size ="xs "
10
- >
11
- < hlm-icon size ="sm " [name] ="'lucideGripVertical' " />
12
- </ button >
13
- < div class =" hidden " > asd </ div >
1
+ < button
2
+ (click) ="openDragMenu() "
3
+ (dragend) ="dragEnd() "
4
+ (dragstart) ="dragStart($event) "
5
+ draggable ="true "
6
+ type ="button "
7
+ hlmBtn
8
+ variant ="ghost "
9
+ size ="xs "
10
+ >
11
+ < hlm-icon size ="sm " [name] ="'lucideGripVertical' " />
12
+ </ button >
13
+
14
14
15
15
< div
16
16
id ="dropdown "
17
- class ="z-10 bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 "
18
17
[ngClass] ="{ hidden: !dragMenuShown } "
19
18
>
20
- < ul
21
- class ="py-2 text-sm text-gray-700 dark:text-gray-200 "
22
- aria-labelledby ="dropdownDefaultButton "
23
- >
24
- < li >
25
- < button
26
- (click) ="deleteBlock() "
27
- type ="button "
28
- class ="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white "
29
- >
30
- Delete
31
- </ button >
32
- </ li >
33
- < li >
34
- < a
35
- href ="# "
36
- class ="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white "
37
- > Settings</ a
38
- >
39
- </ li >
40
- </ ul >
19
+ < hlm-menu class ="shadow-3xl ">
20
+ < hlm-menu-group >
21
+ < button hlmMenuItem type ="button " (click) ="deleteBlock() "> Delete</ button >
22
+ </ hlm-menu-group >
23
+ </ hlm-menu >
41
24
</ div >
Original file line number Diff line number Diff line change @@ -5,11 +5,23 @@ import { provideIcons } from '@ng-icons/core';
5
5
import { lucideGripVertical } from '@ng-icons/lucide' ;
6
6
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm' ;
7
7
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm' ;
8
+ import {
9
+ HlmMenuComponent ,
10
+ HlmMenuGroupComponent ,
11
+ HlmMenuItemDirective ,
12
+ } from '@spartan-ng/ui-menu-helm' ;
8
13
9
14
@Component ( {
10
15
selector : 'bna-drag-handle-menu-btn' ,
11
16
standalone : true ,
12
- imports : [ CommonModule , HlmButtonDirective , HlmIconComponent ] ,
17
+ imports : [
18
+ CommonModule ,
19
+ HlmButtonDirective ,
20
+ HlmIconComponent ,
21
+ HlmMenuComponent ,
22
+ HlmMenuGroupComponent ,
23
+ HlmMenuItemDirective ,
24
+ ] ,
13
25
templateUrl : './bna-drag-handle-menu.component.html' ,
14
26
styleUrl : './bna-drag-handle-menu.component.css' ,
15
27
providers : [ provideIcons ( { lucideGripVertical } ) ] ,
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ export class BnaSuggestionsMenuDirective implements OnChanges {
36
36
`${
37
37
suggestionMenuState . referencePos . top -
38
38
position . top +
39
+ //TODO: change to relative position to view
40
+ 20 +
39
41
suggestionMenuState . referencePos . height
40
42
} px`
41
43
) ;
You can’t perform that action at this time.
0 commit comments