1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00
joplin/packages/app-mobile/components/screens/Note/commands/hideKeyboard.ts

19 lines
551 B
TypeScript

import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
import { _ } from '@joplin/lib/locale';
import { CommandRuntimeProps } from '../types';
export const declaration: CommandDeclaration = {
name: 'hideKeyboard',
label: () => _('Hide keyboard'),
iconName: 'material keyboard-close',
};
export const runtime = (props: CommandRuntimeProps): CommandRuntime => {
return {
execute: async (_context: CommandContext) => {
props.hideKeyboard();
},
enabledCondition: 'keyboardVisible',
};
};