-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tooltips to formatting toolbar
- Loading branch information
Showing
20 changed files
with
330 additions
and
142 deletions.
There are no files selected for viewing
40 changes: 25 additions & 15 deletions
40
...oolbar/default-buttons/basic-text-style-button/bna-basic-text-style-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
<button | ||
type="button" | ||
hlmBtn | ||
size="icon" | ||
variant="ghost" | ||
class="w-[30px] h-[30px]" | ||
[ngClass]="{ | ||
'bg-gray-900 text-gray-100': blockNoteAngularService.editor() | ||
? blockNoteAngularService.editor()!.getActiveStyles()[basicTextStyle()] | ||
: false | ||
}" | ||
(click)="toggleStyle(basicTextStyle())" | ||
> | ||
<hlm-icon size="sm" [name]="icon()" /> | ||
</button> | ||
<hlm-tooltip> | ||
<button | ||
type="button" | ||
hlmBtn | ||
size="icon" | ||
variant="ghost" | ||
class="w-[30px] h-[30px]" | ||
hlmTooltipTrigger | ||
[ngClass]="{ | ||
'bg-gray-900 text-gray-100': blockNoteAngularService.editor() | ||
? blockNoteAngularService.editor()!.getActiveStyles()[basicTextStyle()] | ||
: false | ||
}" | ||
(click)="toggleStyle(basicTextStyle())" | ||
> | ||
<hlm-icon size="sm" [name]="icon()" /> | ||
</button> | ||
|
||
<span *brnTooltipContent class="text-center"> | ||
<p>{{ basicTextStyleDict().tooltip }}</p> | ||
<p class="text-xs"> | ||
{{ basicTextStyleDict().secondary_tooltip }} | ||
</p> | ||
</span> | ||
</hlm-tooltip> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 35 additions & 29 deletions
64
...atting-toolbar/default-buttons/file-caption-button/bna-file-caption-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
<button | ||
type="button" | ||
hlmBtn | ||
size="icon" | ||
variant="ghost" | ||
class="w-[30px] h-[30px]" | ||
[brnMenuTriggerFor]="menu" | ||
> | ||
<hlm-icon size="sm" name="lucideTextCursorInput"/> | ||
</button> | ||
<hlm-tooltip> | ||
<button | ||
type="button" | ||
hlmBtn | ||
size="icon" | ||
variant="ghost" | ||
class="w-[30px] h-[30px]" | ||
[brnMenuTriggerFor]="menu" | ||
hlmTooltipTrigger | ||
> | ||
<hlm-icon size="sm" name="lucideTextCursorInput" /> | ||
</button> | ||
<span *brnTooltipContent class="text-center"> | ||
<p>{{ dict.formatting_toolbar.file_caption.tooltip }}</p> | ||
</span> | ||
|
||
<ng-template #menu> | ||
<hlm-menu> | ||
<hlm-menu-group class="px-2"> | ||
<form (ngSubmit)="submit()" [formGroup]="form"> | ||
<div class="flex gap-2 justify-center items-center min-w-[350px]"> | ||
<div class="flex justify-center items-center w-[20px] h-[20px]"> | ||
<hlm-icon size="sm" name="lucideTextCursorInput" /> | ||
<ng-template #menu> | ||
<hlm-menu> | ||
<hlm-menu-group class="px-2"> | ||
<form (ngSubmit)="submit()" [formGroup]="form"> | ||
<div class="flex gap-2 justify-center items-center min-w-[350px]"> | ||
<div class="flex justify-center items-center w-[20px] h-[20px]"> | ||
<hlm-icon size="sm" name="lucideTextCursorInput" /> | ||
</div> | ||
<input | ||
class="bg-background w-full h-[32px] outline-none placeholder:italic placeholder:text-muted-foreground placeholder:font-normal" | ||
type="text" | ||
placeholder="Edit caption" | ||
[formControl]="form.controls.caption" | ||
/> | ||
</div> | ||
<input | ||
class="bg-background w-full h-[32px] outline-none placeholder:italic placeholder:text-muted-foreground placeholder:font-normal" | ||
type="text" | ||
placeholder="Edit caption" | ||
[formControl]="form.controls.caption" | ||
/> | ||
</div> | ||
<button class="hidden">Save</button> | ||
</form> | ||
</hlm-menu-group> | ||
</hlm-menu> | ||
</ng-template> | ||
<button class="hidden">Save</button> | ||
</form> | ||
</hlm-menu-group> | ||
</hlm-menu> | ||
</ng-template> | ||
</hlm-tooltip> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
...rmatting-toolbar/default-buttons/file-delete-button/bna-file-delete-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
<hlm-tooltip> | ||
<button | ||
type="button" | ||
hlmBtn | ||
size="icon" | ||
variant="ghost" | ||
class="w-[30px] h-[30px]" | ||
hlmTooltipTrigger | ||
(click)="deleteFile()" | ||
> | ||
<hlm-icon size="sm" name="lucideTrash" /> | ||
</button> | ||
|
||
<span *brnTooltipContent class="text-center"> | ||
<p>{{ tooltip() }}</p> | ||
</span> | ||
</hlm-tooltip> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ting-toolbar/default-buttons/file-download-button/bna-file-download-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
<hlm-tooltip> | ||
<button | ||
type="button" | ||
hlmBtn | ||
size="icon" | ||
variant="ghost" | ||
class="w-[30px] h-[30px]" | ||
(click)="downloadFile()" | ||
hlmTooltipTrigger | ||
> | ||
<hlm-icon size="sm" name="lucideDownload" /> | ||
</button> | ||
<span *brnTooltipContent class="text-center"> | ||
<p>{{ tooltip() }}</p> | ||
</span> | ||
</hlm-tooltip> |
Oops, something went wrong.