mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-54793] Convert ./components/widgets/separator/notification-separator.tsx to Function Component (#24887)
* Converted Notification Seperator to function component * Fixed lint error --------- Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
c97731e4a6
commit
4ec573c3fb
@ -5,22 +5,23 @@ import React from 'react';
|
|||||||
import './separator.scss';
|
import './separator.scss';
|
||||||
import './notification-separator.scss';
|
import './notification-separator.scss';
|
||||||
|
|
||||||
export default class NotificationSeparator extends React.PureComponent<React.PropsWithChildren<any>> {
|
type Props = React.PropsWithChildren<any>;
|
||||||
public render() {
|
|
||||||
const {children} = this.props;
|
const NotificationSeparator = ({children}: Props) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className='Separator NotificationSeparator'
|
className='Separator NotificationSeparator'
|
||||||
data-testid='NotificationSeparator'
|
data-testid='NotificationSeparator'
|
||||||
>
|
>
|
||||||
<hr className='separator__hr'/>
|
<hr className='separator__hr'/>
|
||||||
{children && (
|
{children && (
|
||||||
<div className='separator__text'>
|
<div className='separator__text'>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
}
|
|
||||||
|
export default React.memo(NotificationSeparator);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user