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}

View File

@@ -8,9 +8,14 @@
justify-content: center;
gap: var(--Space-x05);
&:disabled {
&:disabled,
&[data-disabled] {
cursor: unset;
}
&[data-pending] {
cursor: progress;
}
}
.size-large {
@@ -172,4 +177,4 @@
display: flex;
align-items: center;
margin-left: var(--Space-x1);
}
}