'use client'; import { Button as RACButton, type ButtonProps as RACButtonProps } from 'react-aria-components/Button'; import {composeRenderProps} from 'react-aria-components/composeRenderProps'; import {ProgressCircle} from './ProgressCircle'; import './Button.css'; interface ButtonProps extends RACButtonProps { /** * The visual style of the button (Vanilla CSS implementation specific). * * @default 'primary' */ variant?: 'primary' | 'secondary' | 'quiet'; } export function Button(props: ButtonProps) { return ( {composeRenderProps(props.children, (children, {isPending}) => ( <> {!isPending && children} {isPending && } ))} ); }