UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

33 lines (32 loc) 787 B
import cx from 'classnames'; import * as React from 'react'; import { Box } from '../../utils/index.js'; export const KbdKeys = { Command: '\u2318 Cmd', Shift: '\u21e7 Shift', Backspace: '\u232b Backspace', Enter: '\u21b5 Enter', Eject: '\u23cf Eject', Control: 'Ctrl', Windows: '\u229e Win', Apple: '\uf8ff', Option: '\u2325 Option', Left: '\u2190', Up: '\u2191', Right: '\u2192', Down: '\u2193', }; export const Kbd = React.forwardRef((props, forwardedRef) => { let { className, children, ...rest } = props; return React.createElement( Box, { as: 'kbd', className: cx('iui-keyboard', className), ref: forwardedRef, ...rest, }, children, ); }); if ('development' === process.env.NODE_ENV) Kbd.displayName = 'Kbd';