[MM-54791]: Convert email icon component to function component (#25548)
* refactor: convert email icon to rfc * chore: update snapshot
Этот коммит содержится в:
@@ -36,7 +36,7 @@ exports[`components/admin_console/system_user_detail should match default snapsh
|
|||||||
Email
|
Email
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<EmailIcon
|
<Memo(EmailIcon)
|
||||||
className="SystemUserDetail__field-icon"
|
className="SystemUserDetail__field-icon"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
@@ -272,7 +272,7 @@ exports[`components/admin_console/system_user_detail should match snapshot if LD
|
|||||||
Email
|
Email
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<EmailIcon
|
<Memo(EmailIcon)
|
||||||
className="SystemUserDetail__field-icon"
|
className="SystemUserDetail__field-icon"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
@@ -510,7 +510,7 @@ exports[`components/admin_console/system_user_detail should match snapshot if MF
|
|||||||
Email
|
Email
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<EmailIcon
|
<Memo(EmailIcon)
|
||||||
className="SystemUserDetail__field-icon"
|
className="SystemUserDetail__field-icon"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
@@ -754,7 +754,7 @@ exports[`components/admin_console/system_user_detail should match snapshot if SA
|
|||||||
Email
|
Email
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<EmailIcon
|
<Memo(EmailIcon)
|
||||||
className="SystemUserDetail__field-icon"
|
className="SystemUserDetail__field-icon"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
@@ -992,7 +992,7 @@ exports[`components/admin_console/system_user_detail should match snapshot if no
|
|||||||
Email
|
Email
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<EmailIcon
|
<Memo(EmailIcon)
|
||||||
className="SystemUserDetail__field-icon"
|
className="SystemUserDetail__field-icon"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
@@ -1228,7 +1228,7 @@ exports[`components/admin_console/system_user_detail should match snapshot if us
|
|||||||
Email
|
Email
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<EmailIcon
|
<Memo(EmailIcon)
|
||||||
className="SystemUserDetail__field-icon"
|
className="SystemUserDetail__field-icon"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export default class EmailIcon extends React.PureComponent<React.HTMLAttributes<HTMLSpanElement>> {
|
type Props = React.HTMLAttributes<HTMLSpanElement>;
|
||||||
render() {
|
|
||||||
|
const EmailIcon: React.FC<Props> = (props) => {
|
||||||
return (
|
return (
|
||||||
<span {...this.props}>
|
<span {...props}>
|
||||||
<svg
|
<svg
|
||||||
width='100%'
|
width='100%'
|
||||||
height='100%'
|
height='100%'
|
||||||
@@ -19,5 +20,6 @@ export default class EmailIcon extends React.PureComponent<React.HTMLAttributes<
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
}
|
|
||||||
|
export default React.memo(EmailIcon);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user