UNPKG

@smitch/fluid

Version:

A lightweight, Tailwind-powered React/Next.js UI component library.

18 lines 1.07 kB
'use client'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { FaBluesky } from 'react-icons/fa6'; import { Button } from '../..'; var BlueskyButton = function (_a) { var text = _a.text, btnShape = _a.btnShape, size = _a.size; var handleShareClick = function () { var baseUrl = 'https://bsky.app/compose'; var params = new URLSearchParams({ text: "".concat(text, " ").concat(window.location.href).replace(/(\r\n|\n|\r)/g, ' '), }); var shareUrl = "".concat(baseUrl, "?").concat(params.toString()); window.open(shareUrl, '_blank', 'noopener,noreferrer'); }; return (_jsxs(Button, { onClick: handleShareClick, btnBackground: 'info', btnColor: 'light', layout: btnShape, size: size, title: 'Share on Bluesky', className: 'hover:opacity-80 focus:text-light focus-visible:outline-accent bg-[#0097FF]', children: [_jsx(FaBluesky, {}), _jsx("span", { className: 'sr-only', children: "Share on Bluesky" })] })); }; export default BlueskyButton; //# sourceMappingURL=BlueskyButton.js.map