and even mooooore tweaks
This commit is contained in:
parent
fb4d28b265
commit
1c0810290b
7 changed files with 40 additions and 22 deletions
|
@ -1,6 +1,6 @@
|
|||
.menu {
|
||||
position: fixed;
|
||||
display: grid;
|
||||
display: none;
|
||||
grid-template-columns: auto auto;
|
||||
place-content: start;
|
||||
|
||||
|
@ -28,4 +28,8 @@
|
|||
text-align: end;
|
||||
}
|
||||
}
|
||||
|
||||
&:popover-open {
|
||||
display: grid;
|
||||
}
|
||||
}
|
|
@ -32,7 +32,16 @@ export const createCommand = (label: string, command: () => any, shortcut?: Comm
|
|||
});
|
||||
};
|
||||
|
||||
export const noop = createCommand('noop', () => { });
|
||||
export const noop = Object.defineProperties(createCommand('noop', () => { }), {
|
||||
withLabel: {
|
||||
value(label: string) {
|
||||
return createCommand(label, () => { });
|
||||
},
|
||||
configurable: false,
|
||||
writable: false,
|
||||
},
|
||||
}) as CommandType & { withLabel(label: string): CommandType };
|
||||
|
||||
|
||||
export const Command: Component<{ command: CommandType }> = (props) => {
|
||||
return <>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue