fix: renamed Spinner -> Loading
This commit is contained in:
committed by
Simon Emanuelsson
parent
d0c6d1d875
commit
32ce7d819b
@@ -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>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user