@truework/true-command
v0.0.4
Published
Command Palette interface
Downloads
25
Keywords
Readme
@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');
}
}
]}
/>
);
}