({children = 'Close'}: CloseButtonProps)
| 91 | } |
| 92 | |
| 93 | export function CloseButton({children = 'Close'}: CloseButtonProps) { |
| 94 | let state = useContext(OverlayStateContext); |
| 95 | return ( |
| 96 | <Button |
| 97 | onPress={() => state?.close()} |
| 98 | className="react-aria-Button button-base" |
| 99 | data-variant="primary"> |
| 100 | {children} |
| 101 | </Button> |
| 102 | ); |
| 103 | } |