UNPKG

@smitch/fluid

Version:

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

16 lines 974 B
'use client'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { FaLinkedin } from 'react-icons/fa'; import { Button } from '../..'; var LinkedInButton = function (_a) { var btnShape = _a.btnShape, size = _a.size; var handleShareClick = function () { var baseUrl = 'https://www.linkedin.com/sharing/share-offsite/'; var shareUrl = new URL(baseUrl); shareUrl.searchParams.set('url', window.location.href); window.open(shareUrl.toString(), '_blank', 'noopener,noreferrer'); }; return (_jsxs(Button, { onClick: handleShareClick, btnBackground: 'primary', btnColor: 'light', layout: btnShape, size: size, title: 'Share on LinkedIn', className: 'hover:opacity-80 focus:text-light focus-visible:outline-accent bg-[#0077B5]', children: [_jsx(FaLinkedin, {}), _jsx("span", { className: 'sr-only', children: "Share on LinkedIn" })] })); }; export default LinkedInButton; //# sourceMappingURL=LinkedinButton.js.map