feat: comment updates

This commit is contained in:
Simon Emanuelsson
2025-05-03 21:56:56 +02:00
committed by Michael Zetterberg
parent 29abc3cba6
commit 91933f47cf
6 changed files with 86 additions and 68 deletions

View File

@@ -24,24 +24,20 @@ export function Button({
className,
})
let loadingType: LoadingProps['type'] = 'White'
if (variant === 'Secondary') {
if (color === 'Inverted') {
loadingType = 'White'
} else {
loadingType = 'Dark'
}
} else {
if (color === 'Inverted') {
loadingType = 'Dark'
} else {
loadingType = 'White'
}
}
return (
<ButtonRAC {...props} className={classNames}>
{({ isPending }) => {
{({ isPending, isHovered }) => {
let loadingType: LoadingProps['type'] = 'White'
if (variant === 'Secondary') {
if (isHovered || color !== 'Inverted') {
loadingType = 'Dark'
}
} else {
if (color === 'Inverted') {
loadingType = 'Dark'
}
}
return (
<>
{children}