= ({
filter,
items,
linkStyle,
showSocial,
style,
layoutStyle = LinkLayoutStyles.HORIZONTAL,
mode = EditorMode.LIVE,
}) => {
let links = items;
if (filter) links = items.filter((itm) => itm.column === filter);
// display: inline-block;
const LI = styled.li`
&:hover {
text-decoration: underline;
}
`;
const OptionallyRenderAsLink = (props) => {
if (mode === EditorMode.EDITOR) return props.children;
return ;
};
return (
{links.map((itm) => {
if (get(itm, "type", LinkDisplayTypes.TEXT) === LinkDisplayTypes.TEXT) {
return (
{itm.caption}
);
}
if (get(itm, "type") === LinkDisplayTypes.ICON) {
return (
{itm.caption}
);
}
if (get(itm, "type") === LinkDisplayTypes.BUTTON) {
return (
);
}
})}
);
};