mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
* add edge function knowledge * deploy edge function mutaton * add edge function block with deploy * update function url * update tools * editor sql * add templates * use monaco editor * hook up templates * fixes * add behind feature flag * preview docs * move editor * initialPrompt * consolidate widgets * remove generic editor * move logic * fix ts * include schema metadata * Fix width of save snippet button * Set tooltip position * Use inlineLink component * Remove unnecessary z index * Lint * Lint import statements in EditorPanel * fixes * fix keyboard shortcut * show/hide results and invalidation * fix focus issues in widget * fixes * fix ts * Support cmd enter shortcut to run query in InlineEditor * Update InlineEditorPreview to use admonition * prompt updates * add discussion url to preview * schemas array * One last clean up --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
24 lines
562 B
TypeScript
24 lines
562 B
TypeScript
import { useAppStateSnapshot } from 'state/app-state'
|
|
import { Button } from 'ui'
|
|
import { SqlEditor } from 'icons'
|
|
|
|
const InlineEditorButton = () => {
|
|
const { setEditorPanel, editorPanel } = useAppStateSnapshot()
|
|
|
|
return (
|
|
<Button
|
|
type="text"
|
|
size="tiny"
|
|
id="editor-trigger"
|
|
className="h-full w-full rounded-none text-foreground-light"
|
|
onClick={() => {
|
|
setEditorPanel({ open: !editorPanel.open })
|
|
}}
|
|
>
|
|
<SqlEditor size={20} strokeWidth={1.5} />
|
|
</Button>
|
|
)
|
|
}
|
|
|
|
export default InlineEditorButton
|