Vizel API / core/src / formatVizelTooltip
Function: formatVizelTooltip()
ts
function formatVizelTooltip(label, shortcut?): string;Defined in: packages/core/src/utils/keyboard.ts:121
Format a tooltip string with an optional keyboard shortcut.
Parameters
| Parameter | Type |
|---|---|
label | string |
shortcut? | string | VizelPlatformShortcut |
Returns
string
Example
ts
formatVizelTooltip("Bold", "Mod+B") // "Bold (⌘B)" on Mac, "Bold (Ctrl+B)" on other
formatVizelTooltip("Quote") // "Quote"