Files
SCM-Manager/scm-ui/ui-components/src/avatar/AvatarWrapper.tsx

19 lines
402 B
TypeScript
Raw Normal View History

import React, { Component, ReactNode } from "react";
import { binder } from "@scm-manager/ui-extensions";
import { EXTENSION_POINT } from "./Avatar";
2018-10-18 14:40:35 +02:00
type Props = {
children: ReactNode;
2018-10-18 14:40:35 +02:00
};
class AvatarWrapper extends Component<Props> {
2018-10-18 14:40:35 +02:00
render() {
if (binder.hasExtension(EXTENSION_POINT)) {
2018-10-18 14:40:35 +02:00
return <>{this.props.children}</>;
}
return null;
}
}
export default AvatarWrapper;