@prezly/theme-kit-ui
Version:
UI components for Prezly themes
86 lines • 2.58 kB
JavaScript
import React from "react";
import { twMerge } from 'tailwind-merge';
import { Icons } from '@/icons';
import { getSocialLinks } from "./utils.mjs";
export function SocialMedia(_ref) {
var {
className,
companySocials,
iconClassName
} = _ref;
var {
facebook,
instagram,
linkedin,
pinterest,
tiktok,
twitter,
youtube
} = getSocialLinks(companySocials);
return /*#__PURE__*/React.createElement("div", {
className: twMerge('flex items-center gap-6', className)
}, facebook && /*#__PURE__*/React.createElement("a", {
href: facebook,
target: "_blank",
rel: "noopener noreferrer",
title: "Facebook",
"aria-label": "Facebook",
className: iconClassName
}, /*#__PURE__*/React.createElement(Icons.Facebook, {
className: "w-6 h-6"
})), instagram && /*#__PURE__*/React.createElement("a", {
href: instagram,
target: "_blank",
rel: "noopener noreferrer",
title: "Instagram",
"aria-label": "Instagram",
className: iconClassName
}, /*#__PURE__*/React.createElement(Icons.Instagram, {
className: "w-6 h-6"
})), linkedin && /*#__PURE__*/React.createElement("a", {
href: linkedin,
target: "_blank",
rel: "noopener noreferrer",
title: "LinkedIn",
"aria-label": "LinkedIn",
className: iconClassName
}, /*#__PURE__*/React.createElement(Icons.Linkedin, {
className: "w-6 h-6"
})), pinterest && /*#__PURE__*/React.createElement("a", {
href: pinterest,
target: "_blank",
rel: "noopener noreferrer",
title: "Pinterest",
"aria-label": "Pinterest",
className: iconClassName
}, /*#__PURE__*/React.createElement(Icons.Pinterest, {
className: "w-6 h-6"
})), tiktok && /*#__PURE__*/React.createElement("a", {
href: tiktok,
target: "_blank",
rel: "noopener noreferrer",
title: "TikTok",
"aria-label": "TikTok",
className: iconClassName
}, /*#__PURE__*/React.createElement(Icons.TikTok, {
className: "w-6 h-6"
})), twitter && /*#__PURE__*/React.createElement("a", {
href: twitter,
target: "_blank",
rel: "noopener noreferrer",
title: "Twitter",
"aria-label": "Twitter",
className: iconClassName
}, /*#__PURE__*/React.createElement(Icons.Twitter, {
className: "w-6 h-6"
})), youtube && /*#__PURE__*/React.createElement("a", {
href: youtube,
target: "_blank",
rel: "noopener noreferrer",
title: "Youtube",
"aria-label": "Youtube",
className: iconClassName
}, /*#__PURE__*/React.createElement(Icons.Youtube, {
className: "w-6 h-6"
})));
}