You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
3.6 KiB
1 line
3.6 KiB
{"ast":null,"code":"import * as React from 'react';\nimport { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport CloseButton from './CloseButton';\nimport ModalContext from './ModalContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst defaultProps = {\n closeLabel: 'Close',\n closeButton: false\n};\nconst AbstractModalHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n closeLabel,\n closeVariant,\n closeButton,\n onHide,\n children,\n ...props\n } = _ref;\n const context = useContext(ModalContext);\n const handleClick = useEventCallback(() => {\n context == null ? void 0 : context.onHide();\n onHide == null ? void 0 : onHide();\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n ref: ref,\n ...props,\n children: [children, closeButton && /*#__PURE__*/_jsx(CloseButton, {\n \"aria-label\": closeLabel,\n variant: closeVariant,\n onClick: handleClick\n })]\n });\n});\nAbstractModalHeader.defaultProps = defaultProps;\nexport default AbstractModalHeader;","map":{"version":3,"names":["React","useContext","useEventCallback","CloseButton","ModalContext","jsx","_jsx","jsxs","_jsxs","defaultProps","closeLabel","closeButton","AbstractModalHeader","forwardRef","ref","closeVariant","onHide","children","props","context","handleClick","variant","onClick"],"sources":["C:/Cours/SAE/SAE-3.01/Scripted/Scripted/website/node_modules/react-bootstrap/esm/AbstractModalHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport CloseButton from './CloseButton';\nimport ModalContext from './ModalContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst defaultProps = {\n closeLabel: 'Close',\n closeButton: false\n};\nconst AbstractModalHeader = /*#__PURE__*/React.forwardRef(({\n closeLabel,\n closeVariant,\n closeButton,\n onHide,\n children,\n ...props\n}, ref) => {\n const context = useContext(ModalContext);\n const handleClick = useEventCallback(() => {\n context == null ? void 0 : context.onHide();\n onHide == null ? void 0 : onHide();\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n ref: ref,\n ...props,\n children: [children, closeButton && /*#__PURE__*/_jsx(CloseButton, {\n \"aria-label\": closeLabel,\n variant: closeVariant,\n onClick: handleClick\n })]\n });\n});\nAbstractModalHeader.defaultProps = defaultProps;\nexport default AbstractModalHeader;"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,OAAO;AAClC,OAAOC,gBAAgB,MAAM,iCAAiC;AAC9D,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,IAAIC,KAAK,QAAQ,mBAAmB;AACjD,MAAMC,YAAY,GAAG;EACnBC,UAAU,EAAE,OAAO;EACnBC,WAAW,EAAE;AACf,CAAC;AACD,MAAMC,mBAAmB,GAAG,aAAaZ,KAAK,CAACa,UAAU,CAAC,OAOvDC,GAAG,KAAK;EAAA,IAPgD;IACzDJ,UAAU;IACVK,YAAY;IACZJ,WAAW;IACXK,MAAM;IACNC,QAAQ;IACR,GAAGC;EACL,CAAC;EACC,MAAMC,OAAO,GAAGlB,UAAU,CAACG,YAAY,CAAC;EACxC,MAAMgB,WAAW,GAAGlB,gBAAgB,CAAC,MAAM;IACzCiB,OAAO,IAAI,IAAI,GAAG,KAAK,CAAC,GAAGA,OAAO,CAACH,MAAM,EAAE;IAC3CA,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAGA,MAAM,EAAE;EACpC,CAAC,CAAC;EACF,OAAO,aAAaR,KAAK,CAAC,KAAK,EAAE;IAC/BM,GAAG,EAAEA,GAAG;IACR,GAAGI,KAAK;IACRD,QAAQ,EAAE,CAACA,QAAQ,EAAEN,WAAW,IAAI,aAAaL,IAAI,CAACH,WAAW,EAAE;MACjE,YAAY,EAAEO,UAAU;MACxBW,OAAO,EAAEN,YAAY;MACrBO,OAAO,EAAEF;IACX,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AACFR,mBAAmB,CAACH,YAAY,GAAGA,YAAY;AAC/C,eAAeG,mBAAmB"},"metadata":{},"sourceType":"module"} |