myprojectpackageprav
Version:
My package in npm
35 lines • 2.08 kB
JavaScript
import React, { useState, useImperativeHandle, forwardRef } from "react";
import { formvalidationmsgs } from './formvalidation-msgs-data';
import { Link } from "react-router-dom";
import "./formvalidation-msgs.css";
//export default function Formvalidationmsgs() {
var Formvalidationmsgs = function (props, ref) {
var _a = useState(false), showSubmit = _a[0], setSubmit = _a[1];
useImperativeHandle(ref, function () { return ({
closeBtn: function () {
setSubmit(false);
}
}); });
var showHideCancel = function () {
setSubmit(false);
if (props.qwer === "top") {
props.popupCloseOpenFunctionality("Close", "top");
}
else {
props.popupCloseOpenFunctionality("Close", "bottom");
}
};
/* onClick={() => setSubmit(false)} */
return (React.createElement(React.Fragment, null,
React.createElement("div", { className: "pt-2 validation-msgs mb-3 py-2 ps-2 whitebg shadow text-color5 bordered7 border-radius p-relative" },
React.createElement("h2", { className: 'px-2 title-color1 font-15 sourcesansprosemibold text-uppercase' },
React.createElement("span", { tabIndex: 0, "aria-label": "Please Fill The Below Mandatory Fields" }, "PLEASE FILL THE BELOW MANDATORY FIELDS")),
React.createElement("button", { type: 'button', title: 'Close', "aria-label": "Close", className: 'anchorclosebutton py-2 px-2 bgcolor-primary whitetext btn-border-radius3', onClick: showHideCancel },
React.createElement("span", { className: "icon-close text-color1 font-10" })),
React.createElement("ul", { tabIndex: 0, "aria-live": "polite", className: 'marker-color list-type-circle font-13 sourcesanspro' }, formvalidationmsgs.map(function (msgs) {
return React.createElement("li", null,
React.createElement(Link, { to: msgs.link, title: msgs.title }, msgs.title));
})))));
};
export default forwardRef(Formvalidationmsgs);
//# sourceMappingURL=formvalidation-msgs.js.map