|
10 | 10 | * governing permissions and limitations under the License. |
11 | 11 | */ |
12 | 12 |
|
13 | | -import {baseColor, fontRelative, style} from '../style/spectrum-theme' with {type: 'macro'}; |
| 13 | +import {baseColor, fontRelative, size as sizeValue, style} from '../style/spectrum-theme' with {type: 'macro'}; |
14 | 14 | import {ButtonRenderProps, ContextValue, Link, LinkProps, OverlayTriggerStateContext, Provider, Button as RACButton, ButtonProps as RACButtonProps} from 'react-aria-components'; |
15 | 15 | import {centerBaseline} from './CenterBaseline'; |
16 | 16 | import {centerPadding, focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; |
@@ -370,8 +370,21 @@ function Button(props: ButtonProps, ref: FocusableRef<HTMLButtonElement>) { |
370 | 370 | isProgressVisible: 1 |
371 | 371 | } |
372 | 372 | })({isProgressVisible, isPending})}> |
373 | | - {/* TODO: size based on t-shirt size once ProgressCircle supports custom sizes */} |
374 | | - <ProgressCircle isIndeterminate aria-label={stringFormatter.format('button.pending')} size="S" staticColor={staticColor} UNSAFE_style={{display: 'block'}} /> |
| 373 | + <ProgressCircle |
| 374 | + isIndeterminate |
| 375 | + aria-label={stringFormatter.format('button.pending')} |
| 376 | + size="S" |
| 377 | + staticColor={staticColor} |
| 378 | + styles={style({ |
| 379 | + size: { |
| 380 | + size: { |
| 381 | + S: sizeValue(14), |
| 382 | + M: sizeValue(18), |
| 383 | + L: 20, |
| 384 | + XL: 24 |
| 385 | + } |
| 386 | + } |
| 387 | + })({size})} /> |
375 | 388 | </div> |
376 | 389 | } |
377 | 390 | </Provider> |
@@ -405,7 +418,8 @@ function LinkButton(props: LinkButtonProps, ref: FocusableRef<HTMLAnchorElement> |
405 | 418 | variant: props.variant || 'primary', |
406 | 419 | fillStyle: props.fillStyle || 'fill', |
407 | 420 | size: props.size || 'M', |
408 | | - staticColor: props.staticColor |
| 421 | + staticColor: props.staticColor, |
| 422 | + isPending: false |
409 | 423 | }, props.styles)}> |
410 | 424 | <Provider |
411 | 425 | values={[ |
|
0 commit comments