react-floating-profile
Version:
React component to display your github profile <p align="left"> <a href="https://www.npmjs.com/package/react-floating-profile"><img src="https://flat.badgen.net/npm/v/react-floating-profile" alt="react-floating-profile version" /></a> <a href="http
11 lines (10 loc) • 895 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useProfile } from "../context/ProfileProvider";
function Button(_a) {
var children = _a.children, onClick = _a.onClick, className = _a.className;
return (_jsx("button", { onClick: onClick, className: className, children: children }));
}
export function CloseButton() {
var setIsOpen = useProfile().setIsOpen;
return (_jsx("div", { className: "close-btn-container", children: _jsx(Button, { className: "close-btn", onClick: function () { return setIsOpen(false); }, children: _jsxs("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) }) }));
}