@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';
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');
}
}
]}
/>
);
}