{"id":334988,"date":"2022-06-25T15:00:23","date_gmt":"2022-06-25T15:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=334988"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=334988","title":{"rendered":"<span>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f react-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e dot-notation \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044e \u0438\u043c\u0435\u043d\u043d\u043e \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u0443<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043e\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0449\u0438\u043c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e react. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b &#8212; \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0432 \u0438\u0434\u0435\u0430\u043b\u0435, \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0436\u0438\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043c\u0438\u043a\u0440\u043e-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e-\u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0445\u043e\u0440\u043e\u0448 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u0412\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435, \u043a\u0430\u043a \u0438 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 react-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0435\u0433\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u0441\u043b\u0430\u0431\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u0445 (\u0434\u0430, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0438\u043d\u0443\u0441\u044b \u0435\u0441\u0442\u044c). \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u043f\u0435\u0440\u0432\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u043e\u0432\u043e\u0433\u043e react \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0435\u043c\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc0\/5d3\/50d\/cc05d350dae49a386ea4d009f6057451.png\" alt=\"\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442\" title=\"\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442\" width=\"302\" height=\"170\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cc0\/5d3\/50d\/cc05d350dae49a386ea4d009f6057451.png\"\/><figcaption>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442<\/figcaption><\/figure>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"markdown\">\u251c\u2500\u2500 shared\/ \u2502   \u2514\u2500\u2500 components\/ \u2502       \u251c\u2500\u2500 EventCard.tsx \/** \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c *\/ \u2502       \u2514\u2500\u2500 ...other components \u251c\u2500\u2500 App.tsx \u2514\u2500\u2500 index.ts<\/code><\/pre>\n<p>\u041c\u044b \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044f\u0433\u0438, \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0442\u0430\u043a \u0437\u0430\u0447\u0435\u043c \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e? \u0421\u043a\u043e\u043c\u043f\u043e\u043d\u0443\u0435\u043c \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: <\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   \/** \u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e string, \u0430 ReactNode, \u0442.\u043a. string \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0437\u043a\u0438\u0439 \u0442\u0438\u043f, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0443\u043a\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 *\/   title: ReactNode;   description: ReactNode;   onShare: () => void;   onMore: () => void;   onRemove: () => void;   onLike: () => void; };  export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onLike,   onMore,   onRemove,   onShare }) => {   return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div>       &lt;footer className=\"action-bar\">         &lt;MoreInfoBtn onClick={onMore} \/>         &lt;RemoveBtn onClick={onRemove} \/>         &lt;LikeBtn onClick={onLike} \/>       &lt;\/footer>     &lt;\/article>   ); }; <\/code><\/pre>\n<pre><code class=\"typescript\">import { EventCard } from \".\/components\/EventCard\";  \/** src\/App.tsx *\/  \/** \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 *\/ export default function App() { \/* .... *\/   return (     &lt;div className=\"App\">       &lt;EventCard         title={title}         description={description}         onLike={handleEventLike}         onRemove={handleEventRemove}         onMore={handleEventMore}         onShare={handleEventShare}       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0424\u0443\u0445, \u0443\u0442\u0435\u0440\u043b\u0438 \u043f\u043e\u0442 \u0441\u043e \u043b\u0431\u0430, \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0447\u0442\u043e \u044d\u0442\u043e? \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u0438\u043b \u043c\u0430\u043a\u0435\u0442\u044b \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430?<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9bd\/98e\/47c\/9bd98e47c6c4c52f713a4d0b5d6e5202.png\" alt=\"\u041a\u043d\u043e\u043f\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\" title=\"\u041a\u043d\u043e\u043f\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\" width=\"296\" height=\"136\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9bd\/98e\/47c\/9bd98e47c6c4c52f713a4d0b5d6e5202.png\"\/><figcaption>\u041a\u043d\u043e\u043f\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e \u0436, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u043f\u043e\u0445\u043e\u0436\u0435 action bar \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041f\u0440\u0430\u0432\u043e\u043a \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u0435\u043c \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u043f\u0441\u043e\u043c-\u0444\u043b\u0430\u0433\u043e\u043c \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u0438\u044f\/\u043f\u043e\u043a\u0430\u0437\u0430 \u043d\u0430\u0448\u0435\u0433\u043e action bar, \u043b\u0438\u0431\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u043f\u0441\u044b \u043a\u0430\u043b\u0431\u0435\u043a\u043e\u0432 \u0434\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u043b\u0443\u0447\u0448\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   \/** ... *\/   onMore?: () => void;   onRemove?: () => void;   onLike?: () => void; };  export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onLike,   onMore,   onRemove,   onShare }) => {   const showActionBar = onMore || onRemove || onLike;    return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div>       {showActionBar &amp;&amp; (         &lt;footer className=\"action-bar\">           {onMore &amp;&amp; &lt;MoreInfoBtn onClick={onMore} \/>}           {onRemove &amp;&amp; &lt;RemoveBtn onClick={onRemove} \/>}           {onLike &amp;&amp; &lt;LikeBtn onClick={onLike} \/>}         &lt;\/footer>       )}     &lt;\/article>   ); };<\/code><\/pre>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043d\u043e\u0432\u0430 \u0432\u0440\u043e\u0434\u0435 \u0440\u0435\u0448\u0435\u043d\u0430 (\u0445\u043e\u0442\u044f \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043a\u043e\u0434\u0430 \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f), \u043d\u043e \u0432\u043e\u0442 \u0434\u043e\u0441\u0430\u0434\u0430, \u043c\u0430\u043a\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u0431\u044b\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u0433\u0434\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0441\u044f action bar \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0438\u043d\u0430\u0447\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8df\/cf8\/5a5\/8dfcf85a572219a3466951f879284869.png\" alt=\"\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043d\u043e\u043f\u043e\u043a\" title=\"\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043d\u043e\u043f\u043e\u043a\" width=\"294\" height=\"147\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8df\/cf8\/5a5\/8dfcf85a572219a3466951f879284869.png\"\/><figcaption>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043d\u043e\u043f\u043e\u043a<\/figcaption><\/figure>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0435 \u043e\u0434\u043d\u043e. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 action bar \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0412\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   \/** ... *\/   onMore?: () => void;   onRemove?: () => void;   onLike?: () => void;   currentBar: \"status\" | \"action\";   statusBarSettings?: {     status: \"active\" | \"disabled\";     percent: 35;     step: \"day\" | \"month\" | \"year\";   }; };  export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onLike,   onMore,   onRemove,   onShare,   currentBar,   statusBarSettings }) => {   const showStatusBar = Boolean(statusBarSettings);   const showActionBar = onMore || onRemove || onLike;    const actionBar = showActionBar ? (     &lt;footer className=\"action-bar\">       {onMore &amp;&amp; &lt;MoreInfoBtn onClick={onMore} \/>}       {onRemove &amp;&amp; &lt;RemoveBtn onClick={onRemove} \/>}       {onLike &amp;&amp; &lt;LikeBtn onClick={onLike} \/>}     &lt;\/footer>   ) : null;    const statusBar = showStatusBar ? (     &lt;footer className=\"status-bar\">       &lt;StatusTag status={statusBarSettings!.status} \/>       &lt;StatView         percent={statusBarSettings!.percent}         step={statusBarSettings!.step}       \/>     &lt;\/footer>   ) : null;    const currentBarRender = currentBar === \"action\" ? actionBar : statusBar;    return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div>       {currentBarRender}     &lt;\/article>   ); };<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e (\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0440\u044f\u0434 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0439, \u0442.\u043a. \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440). \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c, \u043f\u0440\u043e\u043f\u0441\u044b \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u043a\u043b\u044e\u0447\u0435 \u043b\u0438\u0448\u044c \u043f\u043e\u0440\u043e\u0434\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u0446\u0435\u043b\u044b\u0439 \u0441\u043a\u043e\u043f \u0431\u0430\u0433\u043e\u0432. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u043d\u0435 \u043e\u0434\u043e\u0431\u0440\u044f\u0442 \u043d\u0430 \u0440\u0435\u0432\u044c\u044e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434. \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/p>\n<p>\u0422\u0443\u0442 \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0430\u0440\u0443\u0436\u0443, \u0430 \u0441\u0430\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   title: ReactNode;   description: ReactNode;   onShare: () => void; \/** \u0422\u0435\u043f\u0435\u0440\u044c 1 \u043f\u0440\u043e\u043f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430 \u0440\u0435\u043d\u0434\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0444\u0443\u0442\u0435\u0440\u0430 *\/   footer: ReactNode };  \/** \u0412\u044b\u043d\u0435\u0441\u043b\u0438 \u043d\u0430\u0440\u0443\u0436\u0443 \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u0444\u0443\u0442\u0435\u0440\u0430 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u0442\u0430\u043b \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0435\u0435 *\/ export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onShare,   footer }) => {   return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div> {\/** \u0421\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0444\u0443\u0442\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043b\u0430\u0441\u044c \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0430 *\/}       {footer}     &lt;\/article>   ); };<\/code><\/pre>\n<pre><code class=\"typescript\">\/** src\/App.tsx *\/  \/** \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 *\/ export default function App() {   \/** ... *\/   return (     &lt;div className=\"App\">       {\/** \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 action-bar *\/}       &lt;EventCard         title={title}         description={description}         onShare={handleEventShare}         footer={           &lt;footer className=\"action-bar\">             &lt;MoreInfoBtn onClick={handleEventMore} \/>             &lt;RemoveBtn onClick={handleEventRemove} \/>             &lt;LikeBtn onClick={handleEventLike} \/>           &lt;\/footer>         }       \/>       {\/** \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e status-bar *\/}       &lt;EventCard         title={title}         description={description}         onShare={handleEventShare}         footer={           &lt;footer className=\"status-bar\">             &lt;StatusTag status={\"active\"} \/>             &lt;StatView percent={35} step={\"month\"} \/>           &lt;\/footer>         }       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0431\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u044b \u043d\u0430 \u0437\u0434\u043e\u0440\u043e\u0432\u0443\u044e, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a, \u0432\u0435\u0434\u044c \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0444\u0443\u0442\u0435\u0440\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 (\u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438), \u0430 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0445\u0443\u0434\u0448\u0430\u0435\u0442\u0441\u044f. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0435\u0442 \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0438\u0442\u0441\u044f \u0438\u043b\u0438 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u044d\u0442\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c (\u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0435\u0441\u0442\u044c, \u043d\u043e \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0438\u0445 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u044f \u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043f\u043b\u044e\u0441\u043e\u043c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430!).<\/p>\n<p>\u0412 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u0445 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCardActionBar.tsx *\/ type EventCardActionBarProps = {   \/**    * \u0412\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u043f\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438,    * \u0432\u0435\u0434\u044c \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c    * \u0438 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0430\u043f\u0438 \u043a\u0430\u043a \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u043e    *\/   onMore: () => void;   onRemove: () => void;   onLike: () => void; };  \/** \u0414\u043b\u0438\u043d\u043d\u043e\u0435 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0430\u0441\u043d\u043e, \u043d\u043e \u0441\u043a\u043e\u0440\u043e \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c *\/ export const EventCardActionBar: React.FC&lt;EventCardActionBarProps> = ({   onMore,   onRemove,   onLike }) => {   return (     &lt;footer className=\"action-bar\">       &lt;MoreInfoBtn onClick={onMore} \/>       &lt;RemoveBtn onClick={onRemove} \/>       &lt;LikeBtn onClick={onLike} \/>     &lt;\/footer>   ); };<\/code><\/pre>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCardStatusBar.tsx *\/ type EventCardStatusBarProps = {   status: \"active\" | \"disabled\";   percent: 35;   step: \"day\" | \"month\" | \"year\"; };  export const EventCardStatusBar: React.FC&lt;EventCardStatusBarProps> = ({   status,   percent,   step }) => {   return (     &lt;footer className=\"status-bar\">       &lt;StatusTag status={status} \/>       &lt;StatView percent={percent} step={step} \/>     &lt;\/footer>   ); };<\/code><\/pre>\n<p>\u041d\u043e \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0443\u0432\u044b, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f. \u0411\u0435\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043c\u044b\u0441\u043b\u0430 \u043e\u043d\u0438 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 (\u043c\u044b \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0434\u0430\u0442\u044c \u0438\u043c \u0438\u043c\u044f \u0431\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0432\u0435\u0434\u044c \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 ActionBar), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 (\u0442\u0430\u043a \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u043c\u0435\u0441\u0442\u043e \u0441\u0440\u0435\u0434\u0438 \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 shared \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 Button \u0438\u043b\u0438 Input \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u043c \u0438\u0445 \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"markdown\">\u251c\u2500\u2500 shared\/ \u2502   \u2514\u2500\u2500 components\/ \u2502       \u251c\u2500\u2500 EventCard\/ \u2502       \u2502   \u251c\u2500\u2500 StatusBar.tsx (\u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 shared\/components, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0434\u0430\u0442\u044c \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0438\u043c\u044f) \u2502       \u2502   \u251c\u2500\u2500 ActionBar.tsx \u2502       \u2502   \u251c\u2500\u2500 EventCard.tsx \u2502       \u2502   \u2514\u2500\u2500 index.ts (\u043e\u0442\u0441\u044e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435-\u044d\u043a\u0441\u043f\u043e\u0440\u0442, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u043f\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430) \u2502       \u2514\u2500\u2500 ...other components \u251c\u2500\u2500 App.tsx \u2514\u2500\u2500 index.ts<\/code><\/pre>\n<p>\u0423\u0436\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0431\u0435\u0437 \u0431\u043e\u043b\u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0423 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 (compound-component):<\/p>\n<pre><code class=\"typescript\">import { EventCard } from \".\/shared\/components\/EventCard\"; \/** \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u043c\u043f\u043e\u0440\u0442, \u043c\u044b \u0437\u0430\u043b\u0435\u0437\u043b\u0438 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 EventCard \u0438 \u0432\u044b\u0434\u0435\u0440\u043d\u0443\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e *\/ import { ActionBar } from \".\/shared\/components\/EventCard\/ActionBar\"; import { StatusBar } from \".\/shared\/components\/EventCard\/StatusBar\";  \/** \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 *\/ export default function App() {   \/** ... *\/   return (     &lt;div className=\"App\">       {\/** \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 action-bar *\/}       &lt;EventCard         title={title}         description={description}         onShare={handleEventShare}         footer={           &lt;ActionBar             onLike={handleEventLike}             onMore={handleEventMore}             onRemove={handleEventRemove}           \/>         }       \/>       {\/** \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e status-bar *\/}       &lt;EventCard         title={title}         description={description}         onShare={handleEventShare}         footer={&lt;StatusBar percent={35} status={\"active\"} step={\"month\"} \/>}       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u041d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043c\u043f\u043e\u0440\u0442. \u041c\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0430\u043f\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (\u0438\u043c\u043f\u043e\u0440\u0442 \u043d\u0435 \u0441 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u0430 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0448\u0438\u043c\u0438 \u043f\u043e\u0434\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0438\u0445 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 dot-notation \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0435\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u043c \u043d\u0430\u0448 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  \/** \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0434\u0430\u0432\u0430\u044f \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u044b *\/ type EventCardExtensions = {   ActionBar: typeof ActionBar;   StatusBar: typeof StatusBar;   \/** \u0418 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 *\/ };  type EventCardProps = {   title: ReactNode;   description: ReactNode;   onShare: () => void;   \/**     * \u042d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u043e\u0433\u043e\u0441\u0442\u0438,     * \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u0430\u0442\u044c \u0444\u0443\u0442\u0435\u0440\u043e\u043c    * \u0438\u043b\u0438 \u0436\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0440\u0435\u043d\u0434\u0435\u0440 \u043b\u044e\u0431\u043e\u0439 \u043d\u043e\u0434\u044b    *\/   footer: typeof ActionBar | typeof StatusBar;   \/\/ footer: ReactNode };  \/** \u041a \u043f\u0440\u043e\u043f\u0441\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 *\/ export const EventCard: React.FC&lt;EventCardProps> &amp; EventCardExtensions = ({   title,   description,   onShare,   footer }) => {   return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div>       {footer}     &lt;\/article>   ); };  \/** \u0417\u0430\u0448\u044c\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0442 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b *\/ EventCard.ActionBar = ActionBar; EventCard.StatusBar = StatusBar;<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u044f\u0432\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c, \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u043d\u043e \u043e\u0431\u043e\u0441\u043e\u0431\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0438\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u0437\u0434\u043e\u0440\u043e\u0432\u043e, \u043d\u043e \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043f\u0441\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0435\u043d\u0434\u0435\u0440 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c, \u0442.\u043a. \u043c\u044b \u0435\u0433\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u043b\u0438 \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435, \u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u0430\u043c\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c ActionBar \u043d\u0435 \u0432\u043d\u0438\u0437\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0434 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u043f\u0441\u044b \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u043e\u0431\u0449\u0435\u0433\u043e children. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043d\u0430\u0440\u0443\u0436\u0438, \u0430 \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438<\/p>\n<pre><code class=\"typescript\">type EventCardExtensions = {   ActionBar: typeof ActionBar;   StatusBar: typeof StatusBar;   Title: typeof Title;   Content: typeof Content;   \/** \u0418 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 *\/ };  type EventCardProps = {   children: ReactNode; };  export const EventCard: React.FC&lt;EventCardProps> &amp; EventCardExtensions = ({   children }) => {   return &lt;article>{children}&lt;\/article>; };  EventCard.ActionBar = ActionBar; EventCard.StatusBar = StatusBar; EventCard.Title = Title; EventCard.Content = Content;<\/code><\/pre>\n<pre><code class=\"typescript\">\/** \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 *\/ import { EventCard } from \".\/shared\/components\/EventCard\";   \/** \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 *\/ export default function App() {   \/** ... *\/   return (     &lt;div className=\"App\">     {\/** \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043b\u044e\u0431\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f, \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 *\/}       &lt;EventCard>         &lt;EventCard.Title label={title} onShare={handleEventShare} \/>         &lt;EventCard.ActionBar           onLike={handleEventLike}           onMore={handleEventMore}           onRemove={handleEventRemove}         \/>         &lt;EventCard.Content text={description} \/>       &lt;\/EventCard>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043d\u0430\u043f\u0443\u0433\u0430\u0442\u044c. \u0418 \u0435\u0441\u043b\u0438 \u0432 \u0434\u0438\u0437\u0430\u0439\u043d\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0438 \u043e\u043d\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043d\u0430\u0448\u0435\u0433\u043e ui-kit, \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a \u0435\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u0418 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430 <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/89a\/df1\/495\/89adf1495ec615a20d7f2c451032df28.png\" alt=\"\u041a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430? \u041d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c!\" title=\"\u041a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430? \u041d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c!\" width=\"302\" height=\"303\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/89a\/df1\/495\/89adf1495ec615a20d7f2c451032df28.png\"\/><figcaption>\u041a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430? \u041d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c!<\/figcaption><\/figure>\n<p>\u0438\u043b\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/938\/5fa\/d8d\/9385fad8d06d10dd25bade3f12c72e01.png\" alt=\"\u0421\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438? \u041c\u044b \u0438 \u044d\u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c\" title=\"\u0421\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438? \u041c\u044b \u0438 \u044d\u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c\" width=\"291\" height=\"213\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/938\/5fa\/d8d\/9385fad8d06d10dd25bade3f12c72e01.png\"\/><figcaption>\u0421\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438? \u041c\u044b \u0438 \u044d\u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c<\/figcaption><\/figure>\n<p>\u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043c\u0443\u0449\u0435\u043d\u0438\u044f. \u041c\u044b \u0447\u0435\u0442\u043a\u043e \u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a \u0438 \u0433\u0434\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043a\u043e\u0434 \u0441 \u0447\u0435\u0442\u043a\u0438\u043c\u0438 \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u0438 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0435\u0439, \u043e\u0431\u0449\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<p>\u0410 \u043f\u0440\u0438 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0436\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u0442\u044c \u0432 \u043e\u0431\u0435\u0440\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  const EventCardContext = React.createContext({});  export const EventCard: React.FC&lt;EventCardProps> &amp; EventCardExtensions = ({   children }) => {   const [state, setState] = useState();    return (     &lt;article>       &lt;EventCardContext.Provider         value={{ value: state, changeValue: setState }}       >         {children}       &lt;\/EventCardContext.Provider>     &lt;\/article>   ); };  EventCard.ActionBar = ActionBar; EventCard.StatusBar = StatusBar; EventCard.Title = Title; EventCard.Content = Content;<\/code><\/pre>\n<p>\u041a\u0430\u043a\u0438\u0435 \u043c\u0438\u043d\u0443\u0441\u044b? \u0423 \u0432\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0441 tree-shaking \u043f\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b (\u0438\u043b\u0438 \u043f\u043e\u043a\u043e\u043b\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443 \u0432\u0430\u0441 tree-shaking?)<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u043d\u0435\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0437\u0430 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043d\u0435 \u043d\u0430\u043d\u043e\u0441\u044f \u0443\u0449\u0435\u0440\u0431 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/673378\/\"> https:\/\/habr.com\/ru\/post\/673378\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043e\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0449\u0438\u043c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e react. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b &#8212; \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0432 \u0438\u0434\u0435\u0430\u043b\u0435, \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0436\u0438\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043c\u0438\u043a\u0440\u043e-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e-\u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0445\u043e\u0440\u043e\u0448 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u0412\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435, \u043a\u0430\u043a \u0438 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 react-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0435\u0433\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u0441\u043b\u0430\u0431\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u0445 (\u0434\u0430, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0438\u043d\u0443\u0441\u044b \u0435\u0441\u0442\u044c). \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u043f\u0435\u0440\u0432\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u043e\u0432\u043e\u0433\u043e react \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0435\u043c\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442:<\/p>\n<figure class=\"\"><figcaption>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442<\/figcaption><\/figure>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"markdown\">\u251c\u2500\u2500 shared\/ \u2502   \u2514\u2500\u2500 components\/ \u2502       \u251c\u2500\u2500 EventCard.tsx \/** \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c *\/ \u2502       \u2514\u2500\u2500 ...other components \u251c\u2500\u2500 App.tsx \u2514\u2500\u2500 index.ts<\/code><\/pre>\n<p>\u041c\u044b \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044f\u0433\u0438, \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0442\u0430\u043a \u0437\u0430\u0447\u0435\u043c \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e? \u0421\u043a\u043e\u043c\u043f\u043e\u043d\u0443\u0435\u043c \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: <\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   \/** \u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e string, \u0430 ReactNode, \u0442.\u043a. string \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0437\u043a\u0438\u0439 \u0442\u0438\u043f, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0443\u043a\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 *\/   title: ReactNode;   description: ReactNode;   onShare: () => void;   onMore: () => void;   onRemove: () => void;   onLike: () => void; };  export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onLike,   onMore,   onRemove,   onShare }) => {   return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div>       &lt;footer className=\"action-bar\">         &lt;MoreInfoBtn onClick={onMore} \/>         &lt;RemoveBtn onClick={onRemove} \/>         &lt;LikeBtn onClick={onLike} \/>       &lt;\/footer>     &lt;\/article>   ); }; <\/code><\/pre>\n<pre><code class=\"typescript\">import { EventCard } from \".\/components\/EventCard\";  \/** src\/App.tsx *\/  \/** \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 *\/ export default function App() { \/* .... *\/   return (     &lt;div className=\"App\">       &lt;EventCard         title={title}         description={description}         onLike={handleEventLike}         onRemove={handleEventRemove}         onMore={handleEventMore}         onShare={handleEventShare}       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0424\u0443\u0445, \u0443\u0442\u0435\u0440\u043b\u0438 \u043f\u043e\u0442 \u0441\u043e \u043b\u0431\u0430, \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0447\u0442\u043e \u044d\u0442\u043e? \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u0438\u043b \u043c\u0430\u043a\u0435\u0442\u044b \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430?<\/p>\n<figure class=\"\"><figcaption>\u041a\u043d\u043e\u043f\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e \u0436, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u043f\u043e\u0445\u043e\u0436\u0435 action bar \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041f\u0440\u0430\u0432\u043e\u043a \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u0435\u043c \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u043f\u0441\u043e\u043c-\u0444\u043b\u0430\u0433\u043e\u043c \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u0438\u044f\/\u043f\u043e\u043a\u0430\u0437\u0430 \u043d\u0430\u0448\u0435\u0433\u043e action bar, \u043b\u0438\u0431\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u043f\u0441\u044b \u043a\u0430\u043b\u0431\u0435\u043a\u043e\u0432 \u0434\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u043b\u0443\u0447\u0448\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   \/** ... *\/   onMore?: () => void;   onRemove?: () => void;   onLike?: () => void; };  export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onLike,   onMore,   onRemove,   onShare }) => {   const showActionBar = onMore || onRemove || onLike;    return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div>       {showActionBar &amp;&amp; (         &lt;footer className=\"action-bar\">           {onMore &amp;&amp; &lt;MoreInfoBtn onClick={onMore} \/>}           {onRemove &amp;&amp; &lt;RemoveBtn onClick={onRemove} \/>}           {onLike &amp;&amp; &lt;LikeBtn onClick={onLike} \/>}         &lt;\/footer>       )}     &lt;\/article>   ); };<\/code><\/pre>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043d\u043e\u0432\u0430 \u0432\u0440\u043e\u0434\u0435 \u0440\u0435\u0448\u0435\u043d\u0430 (\u0445\u043e\u0442\u044f \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043a\u043e\u0434\u0430 \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f), \u043d\u043e \u0432\u043e\u0442 \u0434\u043e\u0441\u0430\u0434\u0430, \u043c\u0430\u043a\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u0431\u044b\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u0433\u0434\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0441\u044f action bar \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0438\u043d\u0430\u0447\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. <\/p>\n<figure class=\"\"><figcaption>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043d\u043e\u043f\u043e\u043a<\/figcaption><\/figure>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0435 \u043e\u0434\u043d\u043e. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 action bar \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0412\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   \/** ... *\/   onMore?: () => void;   onRemove?: () => void;   onLike?: () => void;   currentBar: \"status\" | \"action\";   statusBarSettings?: {     status: \"active\" | \"disabled\";     percent: 35;     step: \"day\" | \"month\" | \"year\";   }; };  export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onLike,   onMore,   onRemove,   onShare,   currentBar,   statusBarSettings }) => {   const showStatusBar = Boolean(statusBarSettings);   const showActionBar = onMore || onRemove || onLike;    const actionBar = showActionBar ? (     &lt;footer className=\"action-bar\">       {onMore &amp;&amp; &lt;MoreInfoBtn onClick={onMore} \/>}       {onRemove &amp;&amp; &lt;RemoveBtn onClick={onRemove} \/>}       {onLike &amp;&amp; &lt;LikeBtn onClick={onLike} \/>}     &lt;\/footer>   ) : null;    const statusBar = showStatusBar ? (     &lt;footer className=\"status-bar\">       &lt;StatusTag status={statusBarSettings!.status} \/>       &lt;StatView         percent={statusBarSettings!.percent}         step={statusBarSettings!.step}       \/>     &lt;\/footer>   ) : null;    const currentBarRender = currentBar === \"action\" ? actionBar : statusBar;    return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div>       {currentBarRender}     &lt;\/article>   ); };<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e (\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0440\u044f\u0434 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0439, \u0442.\u043a. \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440). \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c, \u043f\u0440\u043e\u043f\u0441\u044b \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u043a\u043b\u044e\u0447\u0435 \u043b\u0438\u0448\u044c \u043f\u043e\u0440\u043e\u0434\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u0446\u0435\u043b\u044b\u0439 \u0441\u043a\u043e\u043f \u0431\u0430\u0433\u043e\u0432. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u043d\u0435 \u043e\u0434\u043e\u0431\u0440\u044f\u0442 \u043d\u0430 \u0440\u0435\u0432\u044c\u044e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434. \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/p>\n<p>\u0422\u0443\u0442 \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0430\u0440\u0443\u0436\u0443, \u0430 \u0441\u0430\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCard.tsx *\/  type EventCardProps = {   title: ReactNode;   description: ReactNode;   onShare: () => void; \/** \u0422\u0435\u043f\u0435\u0440\u044c 1 \u043f\u0440\u043e\u043f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430 \u0440\u0435\u043d\u0434\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0444\u0443\u0442\u0435\u0440\u0430 *\/   footer: ReactNode };  \/** \u0412\u044b\u043d\u0435\u0441\u043b\u0438 \u043d\u0430\u0440\u0443\u0436\u0443 \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u0444\u0443\u0442\u0435\u0440\u0430 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u0442\u0430\u043b \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0435\u0435 *\/ export const EventCard: React.FC&lt;EventCardProps> = ({   title,   description,   onShare,   footer }) => {   return (     &lt;article>       &lt;header>         &lt;h3>{title}&lt;\/h3>         &lt;ShareBtn onClick={onShare} \/>       &lt;\/header>       &lt;div className=\"content\">{description}&lt;\/div> {\/** \u0421\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0444\u0443\u0442\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043b\u0430\u0441\u044c \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0430 *\/}       {footer}     &lt;\/article>   ); };<\/code><\/pre>\n<pre><code class=\"typescript\">\/** src\/App.tsx *\/  \/** \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 *\/ export default function App() {   \/** ... *\/   return (     &lt;div className=\"App\">       {\/** \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 action-bar *\/}       &lt;EventCard         title={title}         description={description}         onShare={handleEventShare}         footer={           &lt;footer className=\"action-bar\">             &lt;MoreInfoBtn onClick={handleEventMore} \/>             &lt;RemoveBtn onClick={handleEventRemove} \/>             &lt;LikeBtn onClick={handleEventLike} \/>           &lt;\/footer>         }       \/>       {\/** \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e status-bar *\/}       &lt;EventCard         title={title}         description={description}         onShare={handleEventShare}         footer={           &lt;footer className=\"status-bar\">             &lt;StatusTag status={\"active\"} \/>             &lt;StatView percent={35} step={\"month\"} \/>           &lt;\/footer>         }       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0431\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u044b \u043d\u0430 \u0437\u0434\u043e\u0440\u043e\u0432\u0443\u044e, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a, \u0432\u0435\u0434\u044c \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0444\u0443\u0442\u0435\u0440\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 (\u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438), \u0430 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0445\u0443\u0434\u0448\u0430\u0435\u0442\u0441\u044f. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0435\u0442 \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0438\u0442\u0441\u044f \u0438\u043b\u0438 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u044d\u0442\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c (\u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0435\u0441\u0442\u044c, \u043d\u043e \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0438\u0445 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u044f \u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043f\u043b\u044e\u0441\u043e\u043c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430!).<\/p>\n<p>\u0412 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u0445 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<\/p>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCardActionBar.tsx *\/ type EventCardActionBarProps = {   \/**    * \u0412\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u043f\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438,    * \u0432\u0435\u0434\u044c \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c    * \u0438 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0430\u043f\u0438 \u043a\u0430\u043a \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u043e    *\/   onMore: () => void;   onRemove: () => void;   onLike: () => void; };  \/** \u0414\u043b\u0438\u043d\u043d\u043e\u0435 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0430\u0441\u043d\u043e, \u043d\u043e \u0441\u043a\u043e\u0440\u043e \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c *\/ export const EventCardActionBar: React.FC&lt;EventCardActionBarProps> = ({   onMore,   onRemove,   onLike }) => {   return (     &lt;footer className=\"action-bar\">       &lt;MoreInfoBtn onClick={onMore} \/>       &lt;RemoveBtn onClick={onRemove} \/>       &lt;LikeBtn onClick={onLike} \/>     &lt;\/footer>   ); };<\/code><\/pre>\n<pre><code class=\"typescript\">\/** src\/shared\/components\/EventCardStatusBar.tsx *\/ type EventCardStatusBarProps = {   status: \"active\" | \"disabled\";   percent: 35;   step: \"day\" | \"month\" | \"year\"; };  <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-334988","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/334988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=334988"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/334988\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=334988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=334988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=334988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}