[MM-56292] Convert ./components/widgets/icons/checkbox_partial_icon.tsx from Class Component to Function Component (#25764)

* [MM-56292] Convert `./components/widgets/icons/checkbox_partial_icon.tsx` from Class Component to Function Component

* refactor: update snapshots
Этот коммит содержится в:
Syed Ali Abbas Zaidi
2023-12-21 15:12:38 +05:00
коммит произвёл GitHub
родитель 4fb3d7a349
Коммит ab6e206a51
2 изменённых файлов: 43 добавлений и 45 удалений

Просмотреть файл

@@ -37,6 +37,6 @@ exports[`components/admin_console/permission_schemes_settings/permission_checkbo
className="permission-check intermediate" className="permission-check intermediate"
data-testid="uniqId-checked" data-testid="uniqId-checked"
> >
<CheckboxPartialIcon /> <Memo(CheckboxPartialIcon) />
</div> </div>
`; `;

Просмотреть файл

@@ -1,54 +1,50 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import React from 'react'; import React, {memo} from 'react';
export default class CheckboxPartialIcon extends React.PureComponent { const CheckboxPartialIcon = () => (
render() { <svg
return ( width='18px'
<svg height='18px'
width='18px' viewBox='0 0 18 18'
height='18px' >
viewBox='0 0 18 18' <g
id='Developer-Export'
stroke='none'
strokeWidth='1'
fillRule='evenodd'
>
<g
transform='translate(-298.000000, -1273.000000)'
id='All-Team-Members'
> >
<g <g transform='translate(245.000000, 698.000000)'>
id='Developer-Export'
stroke='none'
strokeWidth='1'
fillRule='evenodd'
>
<g <g
transform='translate(-298.000000, -1273.000000)' id='Channel-Administrators'
id='All-Team-Members' transform='translate(0.000000, 106.000000)'
> >
<g transform='translate(245.000000, 698.000000)'> <g
id='data-table/column-1'
transform='translate(11.000000, 86.000000)'
>
<g <g
id='Channel-Administrators' id='row-checkbox---@all-@channel-Mentions'
transform='translate(0.000000, 106.000000)' transform='translate(0.000000, 375.000000)'
> >
<g <g id='Stacked-Group'>
id='data-table/column-1'
transform='translate(11.000000, 86.000000)'
>
<g <g
id='row-checkbox---@all-@channel-Mentions' id='data-table/1st/row-checkbox-label-base'
transform='translate(0.000000, 375.000000)' transform='translate(25.000000, 5.000000)'
> >
<g id='Stacked-Group'> <g
<g id='check-on-copy-11'
id='data-table/1st/row-checkbox-label-base' transform='translate(14.000000, 0.000000)'
transform='translate(25.000000, 5.000000)' >
> <path
<g d='M19,3 C20.1,3 21,3.9 21,5 L21,19 C21,20.1 20.1,21 19,21 L5,21 C3.9,21 3,20.1 3,19 L3,5 C3,3.9 3.9,3 5,3 L19,3 Z M7,11 L7,13 L17,13 L17,11 L7,11 Z'
id='check-on-copy-11' id='checkbox---partial'
transform='translate(14.000000, 0.000000)' />
>
<path
d='M19,3 C20.1,3 21,3.9 21,5 L21,19 C21,20.1 20.1,21 19,21 L5,21 C3.9,21 3,20.1 3,19 L3,5 C3,3.9 3.9,3 5,3 L19,3 Z M7,11 L7,13 L17,13 L17,11 L7,11 Z'
id='checkbox---partial'
/>
</g>
</g>
</g> </g>
</g> </g>
</g> </g>
@@ -56,7 +52,9 @@ export default class CheckboxPartialIcon extends React.PureComponent {
</g> </g>
</g> </g>
</g> </g>
</svg> </g>
); </g>
} </svg>
} );
export default memo(CheckboxPartialIcon);