Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

737 B
Raw Blame
import { chakra } from '@chakra-ui/react';
import { ShortcutKeyGlyph } from '@workbench/hotkeys/keyGlyphs';
import { formatHotkeyPartLabel, IS_MAC_OS } from '@workbench/hotkeys/keys';
import { Fragment } from 'react';

/** Use universal key glyphs or platform text; join macOS hints directly and other platforms with +. */
export const TopbarShortcutKeys = ({ parts }: { parts: string[] }) => (
  <chakra.span alignItems="center" display="inline-flex" gap="0.5">
    {parts.map((part, index) => (
      <Fragment key={`${part}:${index}`}>
        {index > 0 && !IS_MAC_OS ? <chakra.span>+</chakra.span> : null}
        <ShortcutKeyGlyph fallback={formatHotkeyPartLabel(part)} part={part} />
      </Fragment>
    ))}
  </chakra.span>
);