fix: renamed Spinner -> Loading

This commit is contained in:
Tobias Johansson
2025-04-24 11:46:25 +02:00
committed by Simon Emanuelsson
parent d0c6d1d875
commit 32ce7d819b
7 changed files with 20 additions and 22 deletions

View File

@@ -1,11 +1,9 @@
import { Button as ButtonRAC } from 'react-aria-components'
import { Loading, type LoadingProps } from '../Loading/Loading'
import { variants } from './variants'
import type { ButtonProps } from './types'
import { Spinner } from '../Spinner'
import styles from './button.module.css'
import { SpinnerProps } from '../Spinner/Spinner'
export function Button({
variant,
@@ -27,17 +25,17 @@ export function Button({
className,
})
let spinnerType: SpinnerProps['type'] = 'Dark'
let loadingType: LoadingProps['type'] = 'Dark'
switch (color) {
case 'Primary':
spinnerType = 'Dark'
loadingType = 'Dark'
break
case 'Inverted':
spinnerType = 'White'
loadingType = 'White'
break
default:
spinnerType = 'Dark'
loadingType = 'Dark'
}
return (
@@ -48,7 +46,7 @@ export function Button({
{children}
{isPending && (
<div className={styles.spinnerWrapper}>
<Spinner size={20} type={spinnerType} />
<Loading size={20} type={loadingType} />
</div>
)}
</>