import { Button as ButtonRAC } from 'react-aria-components' import { variants } from './variants' import type { ButtonProps } from './types' import { Spinner } from '../Spinner' import styles from './button.module.css' export function Button({ variant, color, size, wrapping, typography, className, children, isPending, ...props }: ButtonProps) { const classNames = variants({ variant, color, size, wrapping, typography, className, }) return ( {({ isPending }) => { return ( <> {children} {isPending && (
)} ) }}
) }