UNPKG

@magicbell/magicbell-react

Version:

React components for building a notification inbox for your app

27 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = EnablePushNotificationsButton; const tslib_1 = require("tslib"); const jsx_runtime_1 = require("@emotion/react/jsx-runtime"); /** @jsxImportSource @emotion/react */ const react_1 = require("@emotion/react"); const MagicBellThemeContext_js_1 = require("../../context/MagicBellThemeContext.js"); const index_js_1 = tslib_1.__importDefault(require("../Text/index.js")); /** * * @example * <EnablePushNotificationsButton onClick={enableNotifications} /> */ function EnablePushNotificationsButton({ onClick }) { const theme = (0, MagicBellThemeContext_js_1.useTheme)(); const handleClick = () => { onClick(); }; return ((0, jsx_runtime_1.jsx)("button", { css: (0, react_1.css) ` padding: 10px !important; border-radius: 4px !important; background: ${theme.footer.backgroundColor} !important; color: ${theme.footer.textColor} !important; `, onClick: handleClick, children: (0, jsx_runtime_1.jsx)(index_js_1.default, { id: "web-push-notifications.enable-now", defaultMessage: "Enable Now" }) })); } //# sourceMappingURL=EnablePushNotificationsButton.js.map