Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions packages/@react-spectrum/s2/src/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
style({
order: 1,
truncate: true,
opacity: {
default: 1,
isProgressVisible: 0
visibility: {
isProgressVisible: 'hidden'
}
})({isProgressVisible})
}],
Expand All @@ -325,9 +324,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
size: fontRelative(20),
marginStart: '--iconMargin',
flexShrink: 0,
opacity: {
default: 1,
isProgressVisible: 0
visibility: {
isProgressVisible: 'hidden'
}
})({isProgressVisible})
}],
Expand All @@ -341,9 +339,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
}],
[ImageContext, {
styles: style({
opacity: {
default: 1,
isProgressVisible: 0
visibility: {
isProgressVisible: 'hidden'
}
})({isProgressVisible})
}],
Expand All @@ -357,9 +354,8 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
insetStart: '--badgePosition',
marginTop: 'calc((self(height) * -1)/2)',
marginStart: 'calc((self(height) * -1)/2)',
opacity: {
default: 1,
isProgressVisible: 0
visibility: {
isProgressVisible: 'hidden'
}
})({isProgressVisible})
}]
Expand All @@ -372,9 +368,9 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
opacity: {
default: 0,
isProgressVisible: 1
visibility: {
default: 'hidden',
isProgressVisible: 'visible'
}
})({isProgressVisible, isPending})}>
<ProgressCircle
Expand Down
16 changes: 7 additions & 9 deletions packages/@react-spectrum/s2/src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,8 @@ export const Button = forwardRef(function Button(props: ButtonProps, ref: Focusa
styles: style({
paddingY: '--labelPadding',
order: 1,
opacity: {
default: 1,
isProgressVisible: 0
visibility: {
isProgressVisible: 'hidden'
}
})({isProgressVisible}),
// @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past
Expand All @@ -381,9 +380,8 @@ export const Button = forwardRef(function Button(props: ButtonProps, ref: Focusa
size: fontRelative(20),
marginStart: '--iconMargin',
flexShrink: 0,
opacity: {
default: 1,
isProgressVisible: 0
visibility: {
isProgressVisible: 'hidden'
}
})({isProgressVisible})
}]
Expand All @@ -396,9 +394,9 @@ export const Button = forwardRef(function Button(props: ButtonProps, ref: Focusa
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
opacity: {
default: 0,
isProgressVisible: 1
visibility: {
default: 'hidden',
isProgressVisible: 'visible'
}
})({isProgressVisible, isPending})}>
<ProgressCircle
Expand Down
1 change: 0 additions & 1 deletion packages/@react-spectrum/s2/src/style-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ const allowedOverrides = [
'insetY',
'insetStart',
'insetEnd',
'opacity',
'visibility'
] as const;

Expand Down