import { InformationCircleIcon } from '@heroicons/react/16/solid' import { ArrowDown, ArrowUp } from 'lucide-react' import { PropsWithChildren } from 'react' import { Tooltip, TooltipContent, TooltipTrigger, cn } from 'ui' export const QueryPanelContainer = ({ children, className, }: PropsWithChildren<{ className?: string }>) => (
{children}
) export const QueryPanelSection = ({ children, className, }: PropsWithChildren<{ className?: string }>) => (
{children}
) export const QueryPanelScoreSection = ({ className, name, description, before, after, hideArrowMarkers = false, }: { className?: string name: string description: string before?: number after?: number hideArrowMarkers?: boolean }) => (
{name} {description}
Currently: {before}
{before !== undefined && after !== undefined && before !== after && (
With index: {after} {before !== undefined && !hideArrowMarkers && (
{after > before ? ( ) : ( )} {typeof before === 'number' && before !== 0 && !isNaN(before) && isFinite(before) && ( before ? 'text-warning' : 'text-brand' )} > {(((before - after) / before) * 100).toFixed(2)}% )}
)}
)}
)