mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 10:55:06 +03:00
* Change the getEntityDefinitions query to accept list of schemas instead of being hardcoded to public schema. * Add a schema combo box for selecting schemas. * Use the combobox in the SQL editor to select which schemas should be sent to the AI when asking a question. * Add configurable schemas to AiPolicyEditor. * Remove unneeded hook. * Fix the AI settings modal. * Add keys to the entity definitions query. * Fix the AI settings modal which is used by cmdk flow. * Minor fixes. * Address feedback * Some fixes --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
31 lines
1003 B
TypeScript
31 lines
1003 B
TypeScript
import { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, ReactNode } from 'react'
|
|
import { Button, TooltipContent_Shadcn_, TooltipTrigger_Shadcn_, Tooltip_Shadcn_, cn } from 'ui'
|
|
|
|
export const ButtonTooltip = forwardRef<
|
|
ElementRef<typeof Button>,
|
|
ComponentPropsWithoutRef<typeof Button> & {
|
|
tooltip: {
|
|
content: ComponentProps<typeof TooltipContent_Shadcn_> & {
|
|
text?: string | ReactNode
|
|
}
|
|
}
|
|
}
|
|
>(({ ...props }, ref) => {
|
|
return (
|
|
<Tooltip_Shadcn_>
|
|
<TooltipTrigger_Shadcn_ asChild>
|
|
<Button ref={ref} {...props} className={cn(props.className, 'pointer-events-auto')}>
|
|
{props.children}
|
|
</Button>
|
|
</TooltipTrigger_Shadcn_>
|
|
{props.disabled && props.tooltip.content.text !== undefined && (
|
|
<TooltipContent_Shadcn_ {...props.tooltip.content}>
|
|
{props.tooltip.content.text}
|
|
</TooltipContent_Shadcn_>
|
|
)}
|
|
</Tooltip_Shadcn_>
|
|
)
|
|
})
|
|
|
|
ButtonTooltip.displayName = 'ButtonTooltip'
|