mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
use reflow to migrate from flow to typescript
This commit is contained in:
18
scm-ui/ui-components/src/avatar/AvatarWrapper.tsx
Normal file
18
scm-ui/ui-components/src/avatar/AvatarWrapper.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import * as React from 'react';
|
||||
import { binder } from '@scm-manager/ui-extensions';
|
||||
import { EXTENSION_POINT } from './Avatar';
|
||||
|
||||
type Props = {
|
||||
children: React.Node;
|
||||
};
|
||||
|
||||
class AvatarWrapper extends React.Component<Props> {
|
||||
render() {
|
||||
if (binder.hasExtension(EXTENSION_POINT)) {
|
||||
return <>{this.props.children}</>;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export default AvatarWrapper;
|
||||
Reference in New Issue
Block a user