[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,21 +3,23 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export default class EmailIcon extends React.PureComponent<React.HTMLAttributes<HTMLSpanElement>> {
|
type Props = React.HTMLAttributes<HTMLSpanElement>;
|
||||||
render() {
|
|
||||||
return (
|
const EmailIcon: React.FC<Props> = (props) => {
|
||||||
<span {...this.props}>
|
return (
|
||||||
<svg
|
<span {...props}>
|
||||||
width='100%'
|
<svg
|
||||||
height='100%'
|
width='100%'
|
||||||
viewBox='0 0 24 24'
|
height='100%'
|
||||||
>
|
viewBox='0 0 24 24'
|
||||||
<path
|
>
|
||||||
fill='inherit'
|
<path
|
||||||
d='M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6M20 6L12 11L4 6H20M20 18H4V8L12 13L20 8V18Z'
|
fill='inherit'
|
||||||
/>
|
d='M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6M20 6L12 11L4 6H20M20 18H4V8L12 13L20 8V18Z'
|
||||||
</svg>
|
/>
|
||||||
</span>
|
</svg>
|
||||||
);
|
</span>
|
||||||
}
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
export default React.memo(EmailIcon);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user