// Generated with util/create-component.js import React, { memo } from "react"; import Heading from "../../UI/Heading"; import TextElement from "../Text"; import { IAnnouncementListProps, TIconType } from "./AnnouncementList.types"; const IconComponent = ({ iconType }: { iconType: TIconType }) => { if (iconType === "xMark") { return ( ❌ ); } else if (iconType === "magnifyingGlass") { return ( 🔍 ); } else { return null; } }; const AnnouncementList = ({ contentList }: IAnnouncementListProps) => { return (
{contentList.map(({ iconType, title, content }) => { return (
{title}
); })}
); }; export default memo(AnnouncementList);