(props: AriaButtonProps)
| 44 | } |
| 45 | |
| 46 | function ClearButton(props: AriaButtonProps) { |
| 47 | let ref = useRef<HTMLButtonElement>(null); |
| 48 | // useButton turns the AriaButtonProps from useSearchField into DOM props for the clear button. |
| 49 | let {buttonProps, isPressed} = useButton(props, ref); |
| 50 | |
| 51 | return ( |
| 52 | <button |
| 53 | {...buttonProps} |
| 54 | ref={ref} |
| 55 | className="clear-button" |
| 56 | data-pressed={isPressed || undefined} |
| 57 | data-disabled={props.isDisabled || undefined}> |
| 58 | {props.children} |
| 59 | </button> |
| 60 | ); |
| 61 | } |
nothing calls this directly
no test coverage detected