import { Gridicon } from '@automattic/components'; import clsx from 'clsx'; import SocialLogo from 'calypso/components/social-logo'; const renderIcon = ( icon ) => icon && ( ); const renderSocialIcon = ( icon, color ) => { if ( ! icon ) { return null; } const socialIconClasses = clsx( 'date-picker__social-icon-wrapper', `date-picker__social-icon-wrapper-${ icon }`, { 'date-picker__social-icon-wrapper-color': color } ); return ( ); }; export const CalendarEvent = ( { icon, socialIcon, socialIconColor = true, title } ) => { return (
{ renderIcon( icon ) } { renderSocialIcon( socialIcon, socialIconColor ) } { title }
); };