Resolve CE-2186 "Add close icons to modals"
Deployed to http://ccce.pages.esss.lu.se/dev/ce-ui-common/?path=/story/common-dialog--basic-dialog
- Adds close icon to all modals
- Adds cypress tests
- Improvements:
- title accepts text or a custom component; see stories
- content accepts text or a custom component; see stories
- renderActions provides access to internal onClose if you e.g. want to customize the footer with buttons (and ConfirmationDialog isn't sufficient)
- adds DialogProps for quicker MUI customizability (e.g. size of the dialog)
- Minor Limitations:
- component prop on DialogTitle (MUI) doesn't work; supply a custom title component (instead of text) if you need to use h1, h2, h3 etc. See https://github.com/mui/material-ui/pull/32389 but appears to be broken again in our MUI version
- Breaking Changes:
- DialogTitle is no-longer exported
- Dialog:
- children broken into title, content, and renderActions
- ConfirmationDialog:
- same breaking changes as Dialog
Edited by Christina Jenks