[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
This commit is contained in:
Syed Ali Abbas Zaidi
2023-12-21 15:12:38 +05:00
committed by GitHub
parent 4fb3d7a349
commit ab6e206a51
2 changed files with 43 additions and 45 deletions

View File

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

View File

@@ -1,54 +1,50 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import React, {memo} from 'react';
export default class CheckboxPartialIcon extends React.PureComponent {
render() {
return (
<svg
width='18px'
height='18px'
viewBox='0 0 18 18'
const CheckboxPartialIcon = () => (
<svg
width='18px'
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
id='Developer-Export'
stroke='none'
strokeWidth='1'
fillRule='evenodd'
>
<g transform='translate(245.000000, 698.000000)'>
<g
transform='translate(-298.000000, -1273.000000)'
id='All-Team-Members'
id='Channel-Administrators'
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
id='Channel-Administrators'
transform='translate(0.000000, 106.000000)'
id='row-checkbox---@all-@channel-Mentions'
transform='translate(0.000000, 375.000000)'
>
<g
id='data-table/column-1'
transform='translate(11.000000, 86.000000)'
>
<g id='Stacked-Group'>
<g
id='row-checkbox---@all-@channel-Mentions'
transform='translate(0.000000, 375.000000)'
id='data-table/1st/row-checkbox-label-base'
transform='translate(25.000000, 5.000000)'
>
<g id='Stacked-Group'>
<g
id='data-table/1st/row-checkbox-label-base'
transform='translate(25.000000, 5.000000)'
>
<g
id='check-on-copy-11'
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
id='check-on-copy-11'
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>
@@ -56,7 +52,9 @@ export default class CheckboxPartialIcon extends React.PureComponent {
</g>
</g>
</g>
</svg>
);
}
}
</g>
</g>
</svg>
);
export default memo(CheckboxPartialIcon);