UNPKG

@churchapps/apphelper

Version:

Library of helper functions for React and NextJS ChurchApps

10 lines 806 B
"use client"; import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; import { Fab, Icon } from "@mui/material"; import React from "react"; import { SupportModal } from "./SupportModal"; export const FloatingSupport = (props) => { const [showSupport, setShowSupport] = React.useState(false); return (_jsxs(_Fragment, { children: [_jsx(Fab, { color: "primary", style: { position: "fixed", cursor: "pointer", bottom: "20px", right: (showSupport) ? 47 : 30 }, onClick: () => { setShowSupport(!showSupport); }, "aria-label": "Support", children: _jsx(Icon, { style: { fontSize: 40 }, children: "contact_support" }) }), showSupport && _jsx(SupportModal, { onClose: () => setShowSupport(false), appName: props.appName })] })); }; //# sourceMappingURL=FloatingSupport.js.map