react-spectrum
react-spectrum copied to clipboard
feat(RAC): expose `--page-width` and `--visual-viewport-width` from Modal
Closes
This allows us to properly place a dialog with horizontal scroll document.
<ModalOverlay className="absolute top-0 left-0 h-(--page-height) w-(--page-width)">
<Modal className="grid place-items-center sticky top-0 left-0 h-(--visual-viewport-height) w-(--visual-viewport-width)">
<Dialog />
</Modal>
</ModalOverlay>
✅ Pull Request Checklist:
- [ ] Included link to corresponding React Spectrum GitHub Issue.
- [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
- [ ] Filled out test instructions.
- [ ] Updated documentation (if it already exists for this component).
- [ ] Looked at the Accessibility Practices for this feature - Aria Practices