Files
supabase/apps/studio/components/layouts/AppLayout/InlineEditorButton.tsx
T
Joshen Lim fd98a08a4f Chore/default to new organization layout (#35515)
* Default to new organization layout + remove feature preview

* Remove feature preview

* Clean up LayoutUpdateBanner

* Clean up

* Fix

* Fixy fix

* Update comment

* Nit to fix layout shift
2025-05-13 11:25:35 +08:00

25 lines
695 B
TypeScript

import { SqlEditor } from 'icons'
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
import { useAppStateSnapshot } from 'state/app-state'
import { Button } from 'ui'
export const InlineEditorButton = () => {
const { closeAssistant } = useAiAssistantStateSnapshot()
const { setEditorPanel, editorPanel } = useAppStateSnapshot()
return (
<Button
type="text"
size="tiny"
id="editor-trigger"
className="w-[24px] h-[24px] flex items-center justify-center p-0"
onClick={() => {
closeAssistant()
setEditorPanel({ open: !editorPanel.open })
}}
>
<SqlEditor size={20} strokeWidth={1.5} />
</Button>
)
}