{"id":328387,"date":"2022-01-21T15:00:39","date_gmt":"2022-01-21T15:00:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328387"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328387","title":{"rendered":"<span>\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<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/2ec\/e0a\/4ec\/2ece0a4eca647c336d970fa9436bb971.jpeg\" width=\"1280\" height=\"710\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ec\/e0a\/4ec\/2ece0a4eca647c336d970fa9436bb971.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\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 &#8212; Compound components.<\/p>\n<h3>\u0427\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435<\/h3>\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 &#8212; \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 B &#8212; \u0431\u043b\u043e\u043a\u0430.<\/p>\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 &#8212; \u044d\u0442\u043e select \u0441 \u0435\u0433\u043e option \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c HTML.<\/p>\n<pre><code class=\"xml\">&lt;select name=\"meals\">   &lt;option value=\"pizza\">Pizza&lt;\/option>   &lt;option value=\"pasta\">Pasta&lt;\/option>   &lt;option value=\"borsch\">Borsch&lt;\/option>   &lt;option value=\"fries\">Fries&lt;\/option> &lt;\/select><\/code><\/pre>\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<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<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<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<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<pre><code class=\"javascript\">import React from 'react';  import { Tabs } from 'tabs';  function MyTabs() {     return (         &lt;Tabs onChange={()=> console.log('Tab is changed')}>             &lt;Tabs.Tab>Pie&lt;\/Tabs.Tab>             &lt;Tabs.Tab className=\"custom-tab\">Cake&lt;\/Tabs.Tab>             &lt;Tabs.Tab disabled={true} >Candies&lt;\/Tabs.Tab>             &lt;Tabs.Tab>Cookies&lt;\/Tabs.Tab>         &lt;\/Tabs>     ); }  export default MyTabs;<\/code><\/pre>\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.\u00a0<\/p>\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<pre><code class=\"javascript\">import React from 'react';  import { Tabs } from 'TabsWithoutCC';  function MyTabs() {     return (         &lt;Tabs             onChange={()=> console.log('Tab is changed')}             tabs={[                 { name: \"Pie\" },                 { name: \"Cake\", className: 'custom-tab' },                 { name: \"Candies\", disabled: true },                 { name: \"Cookies\" }             ]}         \/>     ); }  export default MyTabs;<\/code><\/pre>\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<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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, Title } from 'our-design-system';  function AuthForm({ theme }) {     return (         &lt;div>             &lt;Form theme={ theme }>       &lt;div> &lt;Title theme={ theme }>\u041b\u043e\u0433\u0438\u043d&lt;\/Title>       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/>       &lt;div>       &lt;div> &lt;Title theme={ theme }>\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title>                 &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/>       &lt;div>                 &lt;Button theme={ theme } type=\"submit\">\u0412\u043e\u0439\u0442\u0438&lt;\/Button>             &lt;\/Form>         &lt;\/div>     ); }  export default AuthForm;<\/code><\/pre>\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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, Title } from 'our-design-system';  function AuthForm({ isAccountAuth, theme }) {     return (         &lt;div>             &lt;Form theme={ theme }>                 isAccountAuth ? ( &lt;div>                       &lt;Title theme={ theme }>\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430&lt;\/Title> &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\"\/>                     &lt;div>                 ) : (                     &lt;div>                       &lt;Title theme={ theme }>\u041b\u043e\u0433\u0438\u043d&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/>                     &lt;div>                     &lt;div>                       &lt;Title theme={ theme }>\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/>                     &lt;div>                 )                 &lt;Button theme={ theme } type=\"submit\">\u0412\u043e\u0439\u0442\u0438&lt;\/Button>             &lt;\/Form>         &lt;\/div>     ); }  export default AuthForm;<\/code><\/pre>\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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, CardInput, Title } from 'our-design-system';  function AuthForm({ isAccountAuth, isWebview, theme }) {     return (         &lt;div>             &lt;Form theme={ theme }>                 { isAccountAuth &amp;&amp; !isWebview &amp;&amp; (                  &lt;div>                       &lt;Title theme={ theme }>\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430&lt;\/Title> &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\"\/>                     &lt;div>                 ) }                  { 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\"\/> }                  { !isAccountAuth &amp;&amp; (                     &lt;div>                       &lt;Title theme={ theme }>\u041b\u043e\u0433\u0438\u043d&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/>                     &lt;div>                     &lt;div>                       &lt;Title theme={ theme }>\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/>                     &lt;div>                 )}                 &lt;Button theme={ theme } type=\"submit\">\u0412\u043e\u0439\u0442\u0438&lt;\/Button>             &lt;\/Form>         &lt;\/div>     ); }  export default AuthForm; <\/code><\/pre>\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 &#171;\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445&#187; \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\u00a0 \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<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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, Title, CardInput } from 'our-design-system';  const AuthFormContext = React.createContext(undefined);  function AuthForm(props) {     const { theme } = props;     const memoizedContextValue = React.useMemo(         () => ({             theme,         }),         [theme],     );      return (         &lt;AuthFormContext.Provider value={ memoizedContextValue }>             &lt;Form>                 { props.children }             &lt;\/Form>         &lt;\/AuthFormContext.Provider>     ); }  function useAuthForm() {     const context = React.useContext(AuthFormContext);      if (!context) {         throw new Error('This component must be used within a &lt;AuthForm> component.');     }      return context; }  AuthForm.Input = function FormInput(props) {     const { theme } = useAuthForm();     return &lt;Input theme={theme} {...props} \/> }; AuthForm.CardInput = function FormCardInput(props) {     const { theme } = useAuthForm();     return &lt;CardInput theme={theme} {...props} \/> }; AuthForm.Field = function Field({ children, title }) {     const { theme } = useAuthForm();     return (         &lt;div>             &lt;Title theme={ theme }>{ title }&lt;\/Title>             { children }         &lt;\/div>     ) }; AuthForm.SubmitButton = function SubmitButton(props) {     const { theme } = useAuthForm();     return &lt;Button theme={theme} {...props} type=\"submit\" \/> };   export default AuthForm; <\/code><\/pre>\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<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.\u00a0<\/p>\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<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<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<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<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<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<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<pre><code class=\"javascript\">import React from 'react';  import AuthForm from \".\/compound-form\";  export default function LoginAuth() {     return (         &lt;AuthForm theme={'dark'}>             &lt;AuthForm.Field title=\"\u041b\u043e\u0433\u0438\u043d\">                 &lt;AuthForm.Input type=\"text\" placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" \/>             &lt;\/AuthForm.Field>             &lt;AuthForm.Field title=\"\u041f\u0430\u0440\u043e\u043b\u044c\">                 &lt;AuthForm.Input placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\" \/>             &lt;\/AuthForm.Field>             &lt;AuthForm.SubmitButton \/>         &lt;\/AuthForm>     ) } <\/code><\/pre>\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<pre><code class=\"javascript\">import React from 'react';  import AuthForm from \".\/compound-form\";  export default function AccountAuth() {     return (         &lt;AuthForm theme={'dark'}>             &lt;AuthForm.Field title=\"\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430\">                 &lt;AuthForm.Input                     type=\"text\"                     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\"                 \/>             &lt;\/AuthForm.Field>             &lt;AuthForm.SubmitButton \/>         &lt;\/AuthForm>     ) }<\/code><\/pre>\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<pre><code class=\"javascript\">import React from 'react';  import AuthForm from \".\/compound-form\";  export default function AccountAuth() {     return (         &lt;AuthForm theme={'dark'}>             &lt;AuthForm.CardInput                 type=\"text\"                 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\"             \/>             &lt;AuthForm.SubmitButton \/>         &lt;\/AuthForm>     ) }<\/code><\/pre>\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<hr\/>\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<pre><code class=\"javascript\">import React, {   createContext,   useContext,   useState,   useCallback,   useMemo } from \"react\"; import styled from \"styled-components\"; import { Icon } from \"semantic-ui-react\";  const StyledAccordion = styled.div`   border: solid 1px black;   border-radius: 4px;   margin: 10px; `;  const StyledAccordionItem = styled.button`   align-items: center;   background: none;   border: none;   display: flex;   font-weight: normal;   font-size: 1em;   justify-content: space-between;   padding: 10px;   text-align: left;   width: 100%;    &amp;:focus {     box-shadow: 0 0 2px 1px black;   } `;  const Item = styled.div`   border-top: 1px solid black;    &amp;:first-child {     border-top: 0;     border-top-left-radius: 4px;     border-top-right-radius: 4px;   }    &amp;:last-child {     border-bottom-left-radius: 4px;     border-bottom-right-radius: 4px;   }    &amp;:nth-child(odd) {     background-color: ${({ striped }) => (striped ? \"#F0F0F0\" : \"transparent\")};   } `;  const ExpandableSection = styled.section`   background: #e8f4f8;   border-top: solid 1px black;   padding: 10px;   padding-left: 20px; `;  const AccordionContext = createContext();  function useAccordionContext() {   const context = useContext(AccordionContext);   if (!context) {     \/\/ Error message should be more descriptive     throw new Error(\"No context found for Accordion\");   }   return context; }  function Accordion({ children, defaultExpanded = \"wine\", striped = true }) {   const [activeItem, setActiveItem] = useState(defaultExpanded);   const setToggle = useCallback(     (value) => {       setActiveItem(() => {         if (activeItem !== value) return value;         return \"\";       });     },     [setActiveItem, activeItem]   );    const value = useMemo(     () => ({       activeItem,       setToggle,       defaultExpanded,       striped     }),     [setToggle, activeItem, striped, defaultExpanded]   );    return (     &lt;AccordionContext.Provider value={value}>       &lt;StyledAccordion>{children}&lt;\/StyledAccordion>     &lt;\/AccordionContext.Provider>   ); }  function ChevronComponent({ isExpanded }) {   return isExpanded ? &lt;Icon name=\"chevron up\" \/> : &lt;Icon name=\"chevron down\" \/>; }  Accordion.Item = function AccordionItem({ value, children }) {   const { activeItem, setToggle, striped } = useAccordionContext();    return (     &lt;Item striped={striped}>       &lt;StyledAccordionItem         aria-controls={`${value}-panel`}         aria-disabled=\"false\"         aria-expanded={value === activeItem}         id={`${value}-header`}         onClick={() => setToggle(value)}         selected={value === activeItem}         type=\"button\"         value={value}       >         {children}         &lt;ChevronComponent isExpanded={activeItem === value} \/>       &lt;\/StyledAccordionItem>       &lt;ExpandableSection         aria-hidden={activeItem !== value}         aria-labelledby={`${value}-header`}         expanded         hidden={activeItem !== value}         id={`${value}-panel`}       >         Showing expanded content about {value}       &lt;\/ExpandableSection>     &lt;\/Item>   ); }  export { Accordion }; <\/code><\/pre>\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<pre><code class=\"javascript\">import React from \"react\"; import { Accordion } from \".\/Accordion\"; import \".\/styles.css\";  export default function App() {   return (     &lt;div className=\"App\">       &lt;Accordion defaultExpanded=\"beer\" striped>         &lt;Accordion.Item value=\"cider\">Cider&lt;\/Accordion.Item>         &lt;Accordion.Item value=\"beer\">Beer&lt;\/Accordion.Item>         &lt;Accordion.Item value=\"wine\">Wine&lt;\/Accordion.Item>         &lt;Accordion.Item value=\"milk\">Milk&lt;\/Accordion.Item>         &lt;Accordion.Item value=\"patron\">Caf\u00e9 Patron&lt;\/Accordion.Item>       &lt;\/Accordion>     &lt;\/div>   ); }<\/code><\/pre>\n<h2>\u041f\u043e\u0434\u044b\u0442\u043e\u0436\u0438\u043c<\/h2>\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<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<p>\u042d\u0442\u043e \u0432\u0441\u0435 \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c:) \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043b\u0438 \u0432\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0447\u0442\u043e \u044f \u043d\u0435 \u043f\u0440\u0430\u0432, \u043f\u0438\u0448\u0438\u0442\u0435, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c, \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\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\/company\/alfa\/blog\/647013\/\"> https:\/\/habr.com\/ru\/company\/alfa\/blog\/647013\/<\/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_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\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 &#8212; Compound components.<\/p>\n<h3>\u0427\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435<\/h3>\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 &#8212; \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 B &#8212; \u0431\u043b\u043e\u043a\u0430.<\/p>\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 &#8212; \u044d\u0442\u043e select \u0441 \u0435\u0433\u043e option \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c HTML.<\/p>\n<pre><code class=\"xml\">&lt;select name=\"meals\">   &lt;option value=\"pizza\">Pizza&lt;\/option>   &lt;option value=\"pasta\">Pasta&lt;\/option>   &lt;option value=\"borsch\">Borsch&lt;\/option>   &lt;option value=\"fries\">Fries&lt;\/option> &lt;\/select><\/code><\/pre>\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<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<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<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<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<pre><code class=\"javascript\">import React from 'react';  import { Tabs } from 'tabs';  function MyTabs() {     return (         &lt;Tabs onChange={()=> console.log('Tab is changed')}>             &lt;Tabs.Tab>Pie&lt;\/Tabs.Tab>             &lt;Tabs.Tab className=\"custom-tab\">Cake&lt;\/Tabs.Tab>             &lt;Tabs.Tab disabled={true} >Candies&lt;\/Tabs.Tab>             &lt;Tabs.Tab>Cookies&lt;\/Tabs.Tab>         &lt;\/Tabs>     ); }  export default MyTabs;<\/code><\/pre>\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.\u00a0<\/p>\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<pre><code class=\"javascript\">import React from 'react';  import { Tabs } from 'TabsWithoutCC';  function MyTabs() {     return (         &lt;Tabs             onChange={()=> console.log('Tab is changed')}             tabs={[                 { name: \"Pie\" },                 { name: \"Cake\", className: 'custom-tab' },                 { name: \"Candies\", disabled: true },                 { name: \"Cookies\" }             ]}         \/>     ); }  export default MyTabs;<\/code><\/pre>\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<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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, Title } from 'our-design-system';  function AuthForm({ theme }) {     return (         &lt;div>             &lt;Form theme={ theme }>       &lt;div> &lt;Title theme={ theme }>\u041b\u043e\u0433\u0438\u043d&lt;\/Title>       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/>       &lt;div>       &lt;div> &lt;Title theme={ theme }>\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title>                 &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/>       &lt;div>                 &lt;Button theme={ theme } type=\"submit\">\u0412\u043e\u0439\u0442\u0438&lt;\/Button>             &lt;\/Form>         &lt;\/div>     ); }  export default AuthForm;<\/code><\/pre>\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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, Title } from 'our-design-system';  function AuthForm({ isAccountAuth, theme }) {     return (         &lt;div>             &lt;Form theme={ theme }>                 isAccountAuth ? ( &lt;div>                       &lt;Title theme={ theme }>\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430&lt;\/Title> &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\"\/>                     &lt;div>                 ) : (                     &lt;div>                       &lt;Title theme={ theme }>\u041b\u043e\u0433\u0438\u043d&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/>                     &lt;div>                     &lt;div>                       &lt;Title theme={ theme }>\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/>                     &lt;div>                 )                 &lt;Button theme={ theme } type=\"submit\">\u0412\u043e\u0439\u0442\u0438&lt;\/Button>             &lt;\/Form>         &lt;\/div>     ); }  export default AuthForm;<\/code><\/pre>\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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, CardInput, Title } from 'our-design-system';  function AuthForm({ isAccountAuth, isWebview, theme }) {     return (         &lt;div>             &lt;Form theme={ theme }>                 { isAccountAuth &amp;&amp; !isWebview &amp;&amp; (                  &lt;div>                       &lt;Title theme={ theme }>\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430&lt;\/Title> &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\"\/>                     &lt;div>                 ) }                  { 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\"\/> }                  { !isAccountAuth &amp;&amp; (                     &lt;div>                       &lt;Title theme={ theme }>\u041b\u043e\u0433\u0438\u043d&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" type=\"text\"\/>                     &lt;div>                     &lt;div>                       &lt;Title theme={ theme }>\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/Title>                       &lt;Input theme={ theme } placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\" type=\"password\"\/>                     &lt;div>                 )}                 &lt;Button theme={ theme } type=\"submit\">\u0412\u043e\u0439\u0442\u0438&lt;\/Button>             &lt;\/Form>         &lt;\/div>     ); }  export default AuthForm; <\/code><\/pre>\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 &#171;\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445&#187; \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\u00a0 \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<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<pre><code class=\"javascript\">import React from 'react';  import { Form, Input, Button, Title, CardInput } from 'our-design-system';  const AuthFormContext = React.createContext(undefined);  function AuthForm(props) {     const { theme } = props;     const memoizedContextValue = React.useMemo(         () => ({             theme,         }),         [theme],     );      return (         &lt;AuthFormContext.Provider value={ memoizedContextValue }>             &lt;Form>                 { props.children }             &lt;\/Form>         &lt;\/AuthFormContext.Provider>     ); }  function useAuthForm() {     const context = React.useContext(AuthFormContext);      if (!context) {         throw new Error('This component must be used within a &lt;AuthForm> component.');     }      return context; }  AuthForm.Input = function FormInput(props) {     const { theme } = useAuthForm();     return &lt;Input theme={theme} {...props} \/> }; AuthForm.CardInput = function FormCardInput(props) {     const { theme } = useAuthForm();     return &lt;CardInput theme={theme} {...props} \/> }; AuthForm.Field = function Field({ children, title }) {     const { theme } = useAuthForm();     return (         &lt;div>             &lt;Title theme={ theme }>{ title }&lt;\/Title>             { children }         &lt;\/div>     ) }; AuthForm.SubmitButton = function SubmitButton(props) {     const { theme } = useAuthForm();     return &lt;Button theme={theme} {...props} type=\"submit\" \/> };   export default AuthForm; <\/code><\/pre>\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<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.\u00a0<\/p>\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<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<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<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<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<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<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<pre><code class=\"javascript\">import React from 'react';  import AuthForm from \".\/compound-form\";  export default function LoginAuth() {     return (         &lt;AuthForm theme={'dark'}>             &lt;AuthForm.Field title=\"\u041b\u043e\u0433\u0438\u043d\">                 &lt;AuthForm.Input type=\"text\" placeholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\" \/>             &lt;\/AuthForm.Field>       <\/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-328387","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328387","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=328387"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328387\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}