Home > @uniformdev/design-system > getFormattedShortcut

getFormattedShortcut() function

Gets a formatted version of a shortcut for display.

i.e. converts "mod+alt+n" to "['⌘', '⌥', 'N']" on macs, or ['^', 'Alt', 'N'] on windows.

Signature:

Parameters

ParameterTypeDescription
shortcutstring | nullThe +-delimited shortcut string

Returns:

string[]