{"id":2279,"date":"2022-01-26T08:58:37","date_gmt":"2022-01-26T08:58:37","guid":{"rendered":"https:\/\/lvboard.infostore.in.ua\/?p=2279"},"modified":"2022-01-26T08:58:37","modified_gmt":"2022-01-26T08:58:37","slug":"%d1%83%d0%bb%d1%83%d1%87%d1%88%d0%b0%d0%b5%d0%bc-%d0%b4%d0%b8%d0%b7%d0%b0%d0%b9%d0%bd-react-%d0%bf%d1%80%d0%b8%d0%bb%d0%be%d0%b6%d0%b5%d0%bd%d0%b8%d1%8f-%d1%81-%d0%bf%d0%be%d0%bc%d0%be%d1%89%d1%8c","status":"publish","type":"post","link":"https:\/\/lvboard.infostore.in.ua\/?p=2279","title":{"rendered":"\u0423\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u0434\u0438\u0437\u0430\u0439\u043d React \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Compound components"},"content":{"rendered":"\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043e\u0434\u0438\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 React \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 &#8211; Compound components.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h3>\u0427\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435<\/h3>\n\n\n\n<p>Compound components \u044d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043e\u0434\u043d\u043e\u0439 \u043e\u0431\u0449\u0435\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043e\u0431\u0449\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u044d\u0442\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u044b \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435, \u0442\u043a \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u044b\u043c \u0446\u0435\u043b\u044b\u043c. \u042d\u0442\u043e \u043a\u0430\u043a \u0432 BEM \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c E &#8211; \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 B &#8211; \u0431\u043b\u043e\u043a\u0430.<\/p>\n\n\n\n<p>\u0421\u0430\u043c\u044b\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u044e\u0442 \u0432\u0441\u0435 \u0444\u0440\u043e\u043d\u0442\u044b &#8211; \u044d\u0442\u043e select \u0441 \u0435\u0433\u043e option \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c HTML.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;select name=\"meals\"&gt;\n  &lt;option value=\"pizza\"&gt;Pizza&lt;\/option&gt;\n  &lt;option value=\"pasta\"&gt;Pasta&lt;\/option&gt;\n  &lt;option value=\"borsch\"&gt;Borsch&lt;\/option&gt;\n  &lt;option value=\"fries\"&gt;Fries&lt;\/option&gt;\n&lt;\/select&gt;<\/code><\/pre>\n\n\n\n<p>\u0412 \u00ab\u0441\u043b\u043e\u0436\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435\u00bb \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043e\u0434\u043d\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u043e\u0434\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n\n\n\n<h3>\u041a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Compound components<\/h3>\n\n\n\n<p>\u042f \u043c\u043e\u0433\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 2 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0447\u0435\u0433\u043e-\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u043e\u0434\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 (\u043a\u0430\u043a select \u0432 HTML).<\/p>\n\n\n\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044e, \u044f\u0441\u043d\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u0431 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438 \u0432\u043e\u0442 \u0442\u0443\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 Compound components.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport { Tabs } from 'tabs';\n\nfunction MyTabs() {\n    return (\n        &lt;Tabs onChange={()=&gt; console.log('Tab is changed')}&gt;\n            &lt;Tabs.Tab&gt;Pie&lt;\/Tabs.Tab&gt;\n            &lt;Tabs.Tab className=\"custom-tab\"&gt;Cake&lt;\/Tabs.Tab&gt;\n            &lt;Tabs.Tab disabled={true} &gt;Candies&lt;\/Tabs.Tab&gt;\n            &lt;Tabs.Tab&gt;Cookies&lt;\/Tabs.Tab&gt;\n        &lt;\/Tabs&gt;\n    );\n}\n\nexport default MyTabs;<\/code><\/pre>\n\n\n\n<p>\u041f\u043e \u043c\u043e\u0435\u043c\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e, \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438 \u043f\u043e \u0440\u0435\u0430\u043a\u0442\u043e\u0432\u0441\u043a\u0438) \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0430\u0431, \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u043b\u044e\u0431\u044b\u0435 \u043f\u0440\u043e\u043f\u0441\u044b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043e\u0432 \u0441\u0440\u0430\u0437\u0443, \u043d\u0443 \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 Tabs \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043e\u0431\u0449\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430.&nbsp;<\/p>\n\n\n\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0431\u0435\u0437 Compound components:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport { Tabs } from 'TabsWithoutCC';\n\nfunction MyTabs() {\n    return (\n        &lt;Tabs\n            onChange={()=&gt; console.log('Tab is changed')}\n            tabs={&#91;\n                { name: \"Pie\" },\n                { name: \"Cake\", className: 'custom-tab' },\n                { name: \"Candies\", disabled: true },\n                { name: \"Cookies\" }\n            ]}\n        \/&gt;\n    );\n}\n\nexport default MyTabs;<\/code><\/pre>\n\n\n\n<p>\u0410 \u0432\u043e\u0442 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u044f \u043c\u043e\u0449\u044c Compound Components.<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0436\u0438\u0437\u043d\u0438: \u044f \u0434\u0435\u043b\u0430\u043b \u0444\u043e\u0440\u043c\u0443 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u043d\u043a\u0435, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043b\u043e\u0433\u0438\u043d\u0430, \u043f\u0430\u0440\u043e\u043b\u044f, \u0443 \u043d\u0438\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u0430\u0439\u0442\u043b, \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0432\u043e\u0439\u0442\u0438\u00bb, \u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0435\u043c\u043d\u0443\u044e \u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u043e\u0440\u043c\u0443 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430\u0445 \u0438 \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 web-view<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport { Form, Input, Button, Title } from 'our-design-system';\n\nfunction AuthForm({ theme }) {\n    return (\n        &lt;div&gt;\n            &lt;Form theme={ theme }&gt;\n      \t\t\t\t\t&lt;div&gt;\n\t\t\t\t\t\t\t\t\t&lt;Title theme={ theme }&gt;\u041b\u043e\u0433\u0438\u043d&lt;\/Title&gt;\n      \t\t\t\t\t\t&lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/&gt;\n      \t\t\t\t\t&lt;div&gt;\n      \t\t\t\t\t&lt;div&gt;\n\t\t\t\t\t\t\t\t\t&lt;Title theme={ theme }&gt;\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title&gt;\n\t                &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/&gt;\n      \t\t\t\t\t&lt;div&gt;\n                &lt;Button theme={ theme } type=\"submit\"&gt;\u0412\u043e\u0439\u0442\u0438&lt;\/Button&gt;\n            &lt;\/Form&gt;\n        &lt;\/div&gt;\n    );\n}\n\nexport default AuthForm;<\/code><\/pre>\n\n\n\n<p>\u041d\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e \u043b\u043e\u0433\u0438\u043d\u0443\/\u043f\u0430\u0440\u043e\u043b\u044e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0435\u0449\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443 \u0441\u0447\u0435\u0442\u0430. \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c? \u041d\u0443 \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u0438\u043f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport { Form, Input, Button, Title } from 'our-design-system';\n\nfunction AuthForm({ isAccountAuth, theme }) {\n    return (\n        &lt;div&gt;\n            &lt;Form theme={ theme }&gt;\n                isAccountAuth ? (\n\t\t\t\t\t\t\t\t\t\t&lt;div&gt;\n                      &lt;Title theme={ theme }&gt;\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430&lt;\/Title&gt;\n\t\t\t\t\t\t\t\t\t\t\t&lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430\" type=\"number\"\/&gt;\n                    &lt;div&gt;\n                ) : (\n                    &lt;div&gt;\n                      &lt;Title theme={ theme }&gt;\u041b\u043e\u0433\u0438\u043d&lt;\/Title&gt;\n                      &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/&gt;\n                    &lt;div&gt;\n                    &lt;div&gt;\n                      &lt;Title theme={ theme }&gt;\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title&gt;\n                      &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/&gt;\n                    &lt;div&gt;\n                )\n                &lt;Button theme={ theme } type=\"submit\"&gt;\u0412\u043e\u0439\u0442\u0438&lt;\/Button&gt;\n            &lt;\/Form&gt;\n        &lt;\/div&gt;\n    );\n}\n\nexport default AuthForm;<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0431\u0438\u0437\u043d\u0435\u0441 \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0442\u0430\u0439\u0442\u043b\u0430 \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0430 (\u0441\u043b\u0430\u0432\u0430 \u0431\u043e\u0433\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043a\u0430\u0440\u0442\u044b \u0432\u0435\u0440\u0441\u0442\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e, \u043e\u043d \u0435\u0441\u0442\u044c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport { Form, Input, Button, CardInput, Title } from 'our-design-system';\n\nfunction AuthForm({ isAccountAuth, isWebview, theme }) {\n    return (\n        &lt;div&gt;\n            &lt;Form theme={ theme }&gt;\n                { isAccountAuth &amp;&amp; !isWebview &amp;&amp; (\n                 \t\t&lt;div&gt;\n                      &lt;Title theme={ theme }&gt;\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430&lt;\/Title&gt;\n\t\t\t\t\t\t\t\t\t\t\t&lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430\" type=\"number\"\/&gt;\n                    &lt;div&gt;\n                ) }\n\n                { isAccountAuth &amp;&amp; isWebview &amp;&amp; &lt;CardInput theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430\"\/&gt; }\n\n                { !isAccountAuth &amp;&amp; (\n                    &lt;div&gt;\n                      &lt;Title theme={ theme }&gt;\u041b\u043e\u0433\u0438\u043d&lt;\/Title&gt;\n                      &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/&gt;\n                    &lt;div&gt;\n                    &lt;div&gt;\n                      &lt;Title theme={ theme }&gt;\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title&gt;\n                      &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/&gt;\n                    &lt;div&gt;\n                )}\n                &lt;Button theme={ theme } type=\"submit\"&gt;\u0412\u043e\u0439\u0442\u0438&lt;\/Button&gt;\n            &lt;\/Form&gt;\n        &lt;\/div&gt;\n    );\n}\n\nexport default AuthForm;\n<\/code><\/pre>\n\n\n\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0447\u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0441\u044b \u0442\u0438\u043f\u0430: <code>isAccountAuth, isWebview<\/code>. \u0418 \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f, \u044f \u0432\u0438\u0434\u0435\u043b \u0438 \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 &#8220;\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445&#8221; \u043f\u0440\u043e\u043f\u0441\u043e\u0432. \u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u0443\u0442\u044c \u044f \u0434\u0443\u043c\u0430\u044e \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043e\u0431\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u043a\u0443\u0447\u0435\u0439 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u044f\u0435\u0442 \u0431\u043e\u043b\u044c \u0438 \u0441\u0442\u0440\u0430\u0434\u0430\u043d\u0438\u044f (\u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u043c\u043e\u043b \u043d\u043e\u0440\u043c \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043d\u043e \u0442\u0443\u0442 \u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u043f\u0441\u043e\u0432, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b, \u043d\u0435 \u0434\u0438\u0441\u043f\u0430\u0442\u0447\u0438\u043b \u043d\u0438\u0447\u0435\u0433\u043e, \u0442\u0443\u0442 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u0441\u0442\u0430\u0442\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0440\u0430\u0437\u043d\u044b\u0435, \u0432 \u043e\u0431\u0449\u0435\u043c \u043f\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043c\u043d\u0435, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0438\u0439&nbsp; \u043f\u0440\u043e\u0434\u043e\u0432\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0441\u0442\u0440\u0430\u0448\u0430\u044e\u0449\u0435).<\/p>\n\n\n\n<p>\u0414\u0443\u043c\u0430\u044e \u0443\u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c Compound Component, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport { Form, Input, Button, Title, CardInput } from 'our-design-system';\n\nconst AuthFormContext = React.createContext(undefined);\n\nfunction AuthForm(props) {\n    const { theme } = props;\n    const memoizedContextValue = React.useMemo(\n        () =&gt; ({\n            theme,\n        }),\n        &#91;theme],\n    );\n\n    return (\n        &lt;AuthFormContext.Provider value={ memoizedContextValue }&gt;\n            &lt;Form&gt;\n                { props.children }\n            &lt;\/Form&gt;\n        &lt;\/AuthFormContext.Provider&gt;\n    );\n}\n\nfunction useAuthForm() {\n    const context = React.useContext(AuthFormContext);\n\n    if (!context) {\n        throw new Error('This component must be used within a &lt;AuthForm&gt; component.');\n    }\n\n    return context;\n}\n\nAuthForm.Input = function FormInput(props) {\n    const { theme } = useAuthForm();\n    return &lt;Input theme={theme} {...props} \/&gt;\n};\nAuthForm.CardInput = function FormCardInput(props) {\n    const { theme } = useAuthForm();\n    return &lt;CardInput theme={theme} {...props} \/&gt;\n};\nAuthForm.Field = function Field({ children, title }) {\n    const { theme } = useAuthForm();\n    return (\n        &lt;div&gt;\n            &lt;Title theme={ theme }&gt;{ title }&lt;\/Title&gt;\n            { children }\n        &lt;\/div&gt;\n    )\n};\nAuthForm.SubmitButton = function SubmitButton(props) {\n    const { theme } = useAuthForm();\n    return &lt;Button theme={theme} {...props} type=\"submit\" \/&gt;\n};\n\n\nexport default AuthForm;\n<\/code><\/pre>\n\n\n\n<p><em>\u042f \u0432\u0441\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435, \u043d\u043e \u0432\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.<\/em><\/p>\n\n\n\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.&nbsp;<\/p>\n\n\n\n<p>\u0412\u043e \u043f\u0435\u0440\u0432\u044b\u0445 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432 Compound Components \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043f\u0441\u044b \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u0443 \u0441\u0430\u043c\u044b\u0445 \u043d\u0438\u0436\u043d\u0438\u0445 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e.<\/p>\n\n\n\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u043a \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>AuthForm.Field<\/code> , \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u0435\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u0435\u043c\u0443 \u0442\u0430\u0439\u0442\u043b. \u0418\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430.<\/p>\n\n\n\n<p>\u0422\u0430\u043a \u0432\u043e\u0442, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0442\u0438 \u0438\u043c\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0445\u0443\u043a useAuthForm.<\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 <code>AuthForm<\/code> \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e Compound \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<\/p>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u0443 \u043d\u0430\u0441 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u043b\u0438\u0448\u043d\u0438\u0445 \u0440\u0435\u0440\u0435\u043d\u0434\u0435\u0440\u043e\u0432, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c useMemo \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n\n\n\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c.<\/p>\n\n\n\n<p>\u0422\u0430\u043a \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e \u043b\u043e\u0433\u0438\u043d\u0443\/\u043f\u0430\u0440\u043e\u043b\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport AuthForm from \".\/compound-form\";\n\nexport default function LoginAuth() {\n    return (\n        &lt;AuthForm theme={'dark'}&gt;\n            &lt;AuthForm.Field title=\"\u041b\u043e\u0433\u0438\u043d\"&gt;\n                &lt;AuthForm.Input type=\"text\" placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" \/&gt;\n            &lt;\/AuthForm.Field&gt;\n            &lt;AuthForm.Field title=\"\u041f\u0430\u0440\u043e\u043b\u044c\"&gt;\n                &lt;AuthForm.Input placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\" \/&gt;\n            &lt;\/AuthForm.Field&gt;\n            &lt;AuthForm.SubmitButton \/&gt;\n        &lt;\/AuthForm&gt;\n    )\n}\n<\/code><\/pre>\n\n\n\n<p>\u0422\u0430\u043a, \u0442\u0430\u043c \u0433\u0434\u0435 \u0432\u0445\u043e\u0434 \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u0438 \u0441\u0447\u0435\u0442\u0443 \u0434\u043b\u044f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport AuthForm from \".\/compound-form\";\n\nexport default function AccountAuth() {\n    return (\n        &lt;AuthForm theme={'dark'}&gt;\n            &lt;AuthForm.Field title=\"\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430\"&gt;\n                &lt;AuthForm.Input\n                    type=\"text\"\n                    placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430\"\n                \/&gt;\n            &lt;\/AuthForm.Field&gt;\n            &lt;AuthForm.SubmitButton \/&gt;\n        &lt;\/AuthForm&gt;\n    )\n}<\/code><\/pre>\n\n\n\n<p>\u0422\u0430\u043a, \u0442\u0430\u043c \u0433\u0434\u0435 \u0432\u0445\u043e\u0434 \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u0438 \u0441\u0447\u0435\u0442\u0443 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from 'react';\n\nimport AuthForm from \".\/compound-form\";\n\nexport default function AccountAuth() {\n    return (\n        &lt;AuthForm theme={'dark'}&gt;\n            &lt;AuthForm.CardInput\n                type=\"text\"\n                placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430\"\n            \/&gt;\n            &lt;AuthForm.SubmitButton \/&gt;\n        &lt;\/AuthForm&gt;\n    )\n}<\/code><\/pre>\n\n\n\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e Compound Components \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 React \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441 \u0435\u0434\u0438\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439, \u043d\u043e \u0447\u0430\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435. \u0410 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u043e\u0432\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441 \u043b\u043e\u0433\u0438\u043a\u0438 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u044e\u0434\u0430 \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f Compound Components, \u0433\u0434\u0435 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React, {\n  createContext,\n  useContext,\n  useState,\n  useCallback,\n  useMemo\n} from \"react\";\nimport styled from \"styled-components\";\nimport { Icon } from \"semantic-ui-react\";\n\nconst StyledAccordion = styled.div`\n  border: solid 1px black;\n  border-radius: 4px;\n  margin: 10px;\n`;\n\nconst StyledAccordionItem = styled.button`\n  align-items: center;\n  background: none;\n  border: none;\n  display: flex;\n  font-weight: normal;\n  font-size: 1em;\n  justify-content: space-between;\n  padding: 10px;\n  text-align: left;\n  width: 100%;\n\n  &amp;:focus {\n    box-shadow: 0 0 2px 1px black;\n  }\n`;\n\nconst Item = styled.div`\n  border-top: 1px solid black;\n\n  &amp;:first-child {\n    border-top: 0;\n    border-top-left-radius: 4px;\n    border-top-right-radius: 4px;\n  }\n\n  &amp;:last-child {\n    border-bottom-left-radius: 4px;\n    border-bottom-right-radius: 4px;\n  }\n\n  &amp;:nth-child(odd) {\n    background-color: ${({ striped }) =&gt; (striped ? \"\t#F0F0F0\" : \"transparent\")};\n  }\n`;\n\nconst ExpandableSection = styled.section`\n  background: #e8f4f8;\n  border-top: solid 1px black;\n  padding: 10px;\n  padding-left: 20px;\n`;\n\nconst AccordionContext = createContext();\n\nfunction useAccordionContext() {\n  const context = useContext(AccordionContext);\n  if (!context) {\n    \/\/ Error message should be more descriptive\n    throw new Error(\"No context found for Accordion\");\n  }\n  return context;\n}\n\nfunction Accordion({ children, defaultExpanded = \"wine\", striped = true }) {\n  const &#91;activeItem, setActiveItem] = useState(defaultExpanded);\n  const setToggle = useCallback(\n    (value) =&gt; {\n      setActiveItem(() =&gt; {\n        if (activeItem !== value) return value;\n        return \"\";\n      });\n    },\n    &#91;setActiveItem, activeItem]\n  );\n\n  const value = useMemo(\n    () =&gt; ({\n      activeItem,\n      setToggle,\n      defaultExpanded,\n      striped\n    }),\n    &#91;setToggle, activeItem, striped, defaultExpanded]\n  );\n\n  return (\n    &lt;AccordionContext.Provider value={value}&gt;\n      &lt;StyledAccordion&gt;{children}&lt;\/StyledAccordion&gt;\n    &lt;\/AccordionContext.Provider&gt;\n  );\n}\n\nfunction ChevronComponent({ isExpanded }) {\n  return isExpanded ? &lt;Icon name=\"chevron up\" \/&gt; : &lt;Icon name=\"chevron down\" \/&gt;;\n}\n\nAccordion.Item = function AccordionItem({ value, children }) {\n  const { activeItem, setToggle, striped } = useAccordionContext();\n\n  return (\n    &lt;Item striped={striped}&gt;\n      &lt;StyledAccordionItem\n        aria-controls={`${value}-panel`}\n        aria-disabled=\"false\"\n        aria-expanded={value === activeItem}\n        id={`${value}-header`}\n        onClick={() =&gt; setToggle(value)}\n        selected={value === activeItem}\n        type=\"button\"\n        value={value}\n      &gt;\n        {children}\n        &lt;ChevronComponent isExpanded={activeItem === value} \/&gt;\n      &lt;\/StyledAccordionItem&gt;\n      &lt;ExpandableSection\n        aria-hidden={activeItem !== value}\n        aria-labelledby={`${value}-header`}\n        expanded\n        hidden={activeItem !== value}\n        id={`${value}-panel`}\n      &gt;\n        Showing expanded content about {value}\n      &lt;\/ExpandableSection&gt;\n    &lt;\/Item&gt;\n  );\n}\n\nexport { Accordion };\n<\/code><\/pre>\n\n\n\n<p>\u0418 \u0432\u043e\u0442 \u043a\u0430\u043a \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from \"react\";\nimport { Accordion } from \".\/Accordion\";\nimport \".\/styles.css\";\n\nexport default function App() {\n  return (\n    &lt;div className=\"App\"&gt;\n      &lt;Accordion defaultExpanded=\"beer\" striped&gt;\n        &lt;Accordion.Item value=\"cider\"&gt;Cider&lt;\/Accordion.Item&gt;\n        &lt;Accordion.Item value=\"beer\"&gt;Beer&lt;\/Accordion.Item&gt;\n        &lt;Accordion.Item value=\"wine\"&gt;Wine&lt;\/Accordion.Item&gt;\n        &lt;Accordion.Item value=\"milk\"&gt;Milk&lt;\/Accordion.Item&gt;\n        &lt;Accordion.Item value=\"patron\"&gt;Caf\u00e9 Patron&lt;\/Accordion.Item&gt;\n      &lt;\/Accordion&gt;\n    &lt;\/div&gt;\n  );\n}<\/code><\/pre>\n\n\n\n<h2>\u041f\u043e\u0434\u044b\u0442\u043e\u0436\u0438\u043c<\/h2>\n\n\n\n<p>\u041f\u0430\u0442\u0442\u0435\u0440\u043d Compound Components \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u043e \u0432 \u043e\u0442\u0440\u044b\u0432\u0435 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442.<\/p>\n\n\n\n<p>\u0422\u0430\u043a \u0436\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0443 \u0432\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 \u043a\u0443\u0447\u0430 \u043f\u0440\u043e\u043f\u0441\u043e\u0432 \u0442\u0438\u043f\u0430: has\u0427\u0442\u043e\u0422\u043e\u041e\u0434\u043d\u043e=true, with\u0427\u0442\u043e\u0422\u043e\u0414\u0440\u0443\u0433\u043e\u0435=true, show\u0427\u0442\u043e\u0422\u043e\u0422\u0440\u0435\u0442\u044c\u0435=true, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0447\u0442\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u0430 \u0447\u0442\u043e \u043d\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c, \u0442\u043e \u044d\u0442\u043e \u044f\u0432\u043d\u044b\u0439 \u0437\u043d\u0430\u043a, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Compound Components.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043e\u0434\u0438\u043d \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 React \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 &#8211; Compound components.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[30],"tags":[188,65],"_links":{"self":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/2279"}],"collection":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2279"}],"version-history":[{"count":1,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/2279\/revisions"}],"predecessor-version":[{"id":2280,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/2279\/revisions\/2280"}],"wp:attachment":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}