@rtbjs/use-state
Version:
`@rtbjs/use-state` is a state management tool that can act as a local state and be easily turned into a global redux state. It is an innovative approach to state management that combines the advantages of both React's useState and Redux's state management
11 lines • 5.05 kB
JavaScript
"use strict";
exports.__esModule = true;
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("@testing-library/react");
var DraggableModalProvider_1 = require("./DraggableModalProvider");
var DraggableModal_1 = require("./DraggableModal");
test('renders', function () {
(0, react_1.render)((0, jsx_runtime_1.jsx)(DraggableModalProvider_1.DraggableModalProvider, { children: (0, jsx_runtime_1.jsx)(DraggableModal_1.DraggableModal, { visible: true }) }));
expect(document.body).toMatchInlineSnapshot("\n <body\n class=\"ant-scrolling-effect\"\n style=\"overflow: hidden; overflow-x: hidden; overflow-y: hidden;\"\n >\n <div />\n <div>\n <div\n class=\"ant-modal-root\"\n >\n <div\n aria-labelledby=\"rcDialogTitle0\"\n class=\"ant-modal-wrap toolbox-ant-design-draggable-modal\"\n role=\"dialog\"\n style=\"z-index: 1;\"\n tabindex=\"-1\"\n >\n <div\n class=\"ant-modal\"\n role=\"document\"\n style=\"margin: 0px; padding-bottom: 0px; pointer-events: auto; top: -16px; left: 112px; height: 800px; width: 800px;\"\n >\n <div\n aria-hidden=\"true\"\n style=\"width: 0px; height: 0px; overflow: hidden; outline: none;\"\n tabindex=\"0\"\n />\n <div\n class=\"ant-modal-content\"\n >\n <button\n aria-label=\"Close\"\n class=\"ant-modal-close\"\n type=\"button\"\n >\n <span\n class=\"ant-modal-close-x\"\n >\n <span\n aria-label=\"close\"\n class=\"anticon anticon-close ant-modal-close-icon\"\n role=\"img\"\n >\n <svg\n aria-hidden=\"true\"\n data-icon=\"close\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"1em\"\n viewBox=\"64 64 896 896\"\n width=\"1em\"\n >\n <path\n d=\"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z\"\n />\n </svg>\n </span>\n </span>\n </button>\n <div\n class=\"ant-modal-header\"\n >\n <div\n class=\"ant-modal-title\"\n id=\"rcDialogTitle0\"\n >\n <div\n class=\"toolbox-ant-design-draggable-modal-title\"\n />\n </div>\n </div>\n <div\n class=\"ant-modal-body\"\n >\n <div\n class=\"toolbox-ant-design-draggable-modal-resize-handle\"\n >\n <div\n class=\"toolbox-ant-design-draggable-modal-resize-handle-inner\"\n />\n </div>\n </div>\n <div\n class=\"ant-modal-footer\"\n >\n <button\n class=\"ant-btn\"\n type=\"button\"\n >\n <span>\n Cancel\n </span>\n </button>\n <button\n class=\"ant-btn ant-btn-primary\"\n type=\"button\"\n >\n <span>\n OK\n </span>\n </button>\n </div>\n </div>\n <div\n aria-hidden=\"true\"\n style=\"width: 0px; height: 0px; overflow: hidden; outline: none;\"\n tabindex=\"0\"\n />\n </div>\n </div>\n </div>\n </div>\n </body>\n ");
});
//# sourceMappingURL=DraggableModal.test.js.map