mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 13:19:09 +03:00
* feat(preferences): allow disable hotkeys Add a section in /account/me for disabling hotkeys. Only added one hotkey for now (Cmd + E for toggling editor side panel) but we can add more with the same pattern. * refactor: remove default export on ProjectLayout * feat(hotkeys): allow toggling of command menu and ai assistant hotkeys * Nit * PRettier lint --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
34 lines
863 B
TypeScript
34 lines
863 B
TypeScript
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
|
|
import { SqlEditor } from 'icons'
|
|
import { KeyboardShortcut } from 'ui'
|
|
|
|
export const InlineEditorButton = ({
|
|
onClick,
|
|
showShortcut = true,
|
|
}: {
|
|
onClick: () => void
|
|
showShortcut?: boolean
|
|
}) => {
|
|
return (
|
|
<ButtonTooltip
|
|
type="text"
|
|
size="tiny"
|
|
id="editor-trigger"
|
|
className="rounded-none w-[32px] h-[30px] flex items-center justify-center p-0 text-foreground-light hover:text-foreground"
|
|
onClick={onClick}
|
|
tooltip={{
|
|
content: {
|
|
text: (
|
|
<div className="flex items-center gap-4">
|
|
<span>SQL Editor</span>
|
|
{showShortcut && <KeyboardShortcut keys={['Meta', 'e']} />}
|
|
</div>
|
|
),
|
|
},
|
|
}}
|
|
>
|
|
<SqlEditor size={18} strokeWidth={1.5} />
|
|
</ButtonTooltip>
|
|
)
|
|
}
|