- Added new dependencies for drag-and-drop functionality with @dnd-kit packages. - Updated package versions for @tanstack/react-virtual and date-fns. - Refactored AppShell component to utilize AppSidebar and SiteHeader for improved layout. - Enhanced Frame component with new theming capabilities and improved structure. - Introduced filtering capabilities in Agents and Lists pages with new UI elements. - Added new utility functions for authentication claims management. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
744 B
TypeScript
33 lines
744 B
TypeScript
import type { ComponentProps } from 'react'
|
|
import { Button } from '@evofw/ui/components/button'
|
|
import { Spinner } from '@evofw/ui/components/spinner'
|
|
import { cn } from '@evofw/ui/lib/utils'
|
|
|
|
interface LoadingButtonProps extends ComponentProps<typeof Button> {
|
|
isLoading?: boolean
|
|
loadingLabel?: string
|
|
}
|
|
|
|
export function LoadingButton({
|
|
isLoading = false,
|
|
loadingLabel,
|
|
children,
|
|
disabled,
|
|
className,
|
|
...props
|
|
}: LoadingButtonProps) {
|
|
const label =
|
|
isLoading && loadingLabel != null ? loadingLabel : children
|
|
|
|
return (
|
|
<Button
|
|
disabled={disabled ?? isLoading}
|
|
className={cn(className)}
|
|
{...props}
|
|
>
|
|
{isLoading && <Spinner data-icon="inline-start" />}
|
|
{label}
|
|
</Button>
|
|
)
|
|
}
|