({title, children, ...props}: DialogProps)
| 75 | } |
| 76 | |
| 77 | export function Dialog({title, children, ...props}: DialogProps) { |
| 78 | let ref = useRef<HTMLDivElement>(null); |
| 79 | let {dialogProps, titleProps} = useDialog(props, ref); |
| 80 | |
| 81 | return ( |
| 82 | <div {...dialogProps} ref={ref} className="react-aria-Dialog"> |
| 83 | {title && ( |
| 84 | <h3 {...titleProps} slot="title" className="react-aria-Heading"> |
| 85 | {title} |
| 86 | </h3> |
| 87 | )} |
| 88 | {children} |
| 89 | </div> |
| 90 | ); |
| 91 | } |
| 92 | |
| 93 | export function CloseButton({children = 'Close'}: CloseButtonProps) { |
| 94 | let state = useContext(OverlayStateContext); |
nothing calls this directly
no test coverage detected