mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
use reflow to migrate from flow to typescript
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import React from 'react';
|
||||
import { ExtensionPoint } from '@scm-manager/ui-extensions';
|
||||
import { Plugin } from '@scm-manager/ui-types';
|
||||
import { Image } from '@scm-manager/ui-components';
|
||||
|
||||
type Props = {
|
||||
plugin: Plugin;
|
||||
};
|
||||
|
||||
export default class PluginAvatar extends React.Component<Props> {
|
||||
render() {
|
||||
const { plugin } = this.props;
|
||||
return (
|
||||
<p className="image is-64x64">
|
||||
<ExtensionPoint
|
||||
name="plugins.plugin-avatar"
|
||||
props={{
|
||||
plugin,
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
src={plugin.avatarUrl ? plugin.avatarUrl : '/images/blib.jpg'}
|
||||
alt="Logo"
|
||||
/>
|
||||
</ExtensionPoint>
|
||||
</p>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user