@motech-development/breeze-ui 2.0.34 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs.js CHANGED
@@ -1961,14 +1961,16 @@ const ModalContent = styled__default.default.div`
1961
1961
  pointer-events: auto;
1962
1962
  `;
1963
1963
  const ModalDialog = styled__default.default.div`
1964
- box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 5px 8px 0 rgba(0, 0, 0, 0.14),
1964
+ box-shadow:
1965
+ 0 3px 5px -1px rgba(0, 0, 0, 0.2),
1966
+ 0 5px 8px 0 rgba(0, 0, 0, 0.14),
1965
1967
  0 1px 14px 0 rgba(0, 0, 0, 0.12);
1966
1968
  margin: 5rem auto;
1967
- max-width: 500px;
1969
+ max-width: ${({ size })=>size === 'sm' ? '500px' : '90vw'};
1968
1970
  pointer-events: none;
1969
1971
  position: relative;
1970
1972
  `;
1971
- const Modal = ({ children, isOpen, onDismiss, title })=>{
1973
+ const Modal = ({ children, isOpen, onDismiss, size = 'sm', title })=>{
1972
1974
  const output = document.createElement('div');
1973
1975
  const doNotDismiss = (e)=>{
1974
1976
  e.stopPropagation();
@@ -1983,6 +1985,7 @@ const Modal = ({ children, isOpen, onDismiss, title })=>{
1983
1985
  tabIndex: -1,
1984
1986
  onClick: onDismiss,
1985
1987
  children: /*#__PURE__*/ jsxRuntime.jsx(ModalDialog, {
1988
+ size: size,
1986
1989
  role: "document",
1987
1990
  children: /*#__PURE__*/ jsxRuntime.jsx(ModalContent, {
1988
1991
  onClick: doNotDismiss,