mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 23:59:08 +03:00
24 lines
641 B
TypeScript
24 lines
641 B
TypeScript
import * as Tooltip from '@radix-ui/react-tooltip'
|
|
import { Wand } from 'lucide-react'
|
|
import { Button } from 'ui'
|
|
import { useAppStateSnapshot } from 'state/app-state'
|
|
import { AiIconAnimation } from 'ui'
|
|
|
|
const AssistantButton = () => {
|
|
const { setAiAssistantPanel, aiAssistantPanel } = useAppStateSnapshot()
|
|
|
|
return (
|
|
<Button
|
|
type="text"
|
|
id="assistant-trigger"
|
|
className="w-6 h-6"
|
|
onClick={() => {
|
|
setAiAssistantPanel({ open: !aiAssistantPanel.open })
|
|
}}
|
|
icon={<AiIconAnimation allowHoverEffect className="w-4 h-4 text-foreground-light" />}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default AssistantButton
|