({slot, ...props}: AriaButtonProps & {slot: string})
| 46 | } |
| 47 | |
| 48 | function StepperButton({slot, ...props}: AriaButtonProps & {slot: string}) { |
| 49 | let ref = useRef<HTMLButtonElement>(null); |
| 50 | // useButton turns the AriaButtonProps from useNumberField into DOM props for each stepper. |
| 51 | let {buttonProps, isPressed} = useButton(props, ref); |
| 52 | let {hoverProps, isHovered} = useHover(props); |
| 53 | let {focusProps, isFocusVisible} = useFocusRing(); |
| 54 | |
| 55 | return ( |
| 56 | <button |
| 57 | {...mergeProps(buttonProps, hoverProps, focusProps)} |
| 58 | ref={ref} |
| 59 | slot={slot} |
| 60 | className="react-aria-Button button-base" |
| 61 | data-variant="secondary" |
| 62 | data-pressed={isPressed || undefined} |
| 63 | data-hovered={isHovered || undefined} |
| 64 | data-focus-visible={isFocusVisible || undefined} |
| 65 | data-disabled={props.isDisabled || undefined}> |
| 66 | {props.children} |
| 67 | </button> |
| 68 | ); |
| 69 | } |
nothing calls this directly
no test coverage detected