This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@truework/true-command
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

@truework/TrueCommand

Command bar for creating app shortcuts

npm i @truework/true-command

Example

To open the command palette press Cmd/Ctrl + k

import { CommandPalette } from '@truework/true-command';
// needed to use default command palette styles
import '@truework/true-command/dist/styles.css';

export function CommandBar() {
  return (
    <CommandPalette
      commands={[
        {
          name: 'Start verification',
          action: () => {
            console.log('Start verification action');
          },
          shortcutKey: {
            key: 'N',
            specialKey: 'shift'
          }
        },
        {
          name: 'Open settings',
          description: 'Opens the settings page',
          action: () => {
            console.log('Open settings action');
          }
        }
      ]}
    />
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i @truework/true-command

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

1.75 MB

Total Files

6

Last publish

Collaborators

  • js-truework
  • truework-team