UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

10 lines (9 loc) 465 B
import { KeyCode } from '../../../keycode'; var isSpecialCommand = function (keyCode) { return keyCode > 7 && keyCode < 47 && keyCode !== KeyCode.space; }; var isClipboardCommand = function (ctrlKey, metaKey) { return ctrlKey || metaKey; }; export var isCommand = function (keyCode, ctrlKey, metaKey) { return isSpecialCommand(keyCode) || isClipboardCommand(ctrlKey, metaKey); }; export var isDigit = function (char) { return !isNaN(parseInt(char, 10)); };