mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
restructure scm-ui and use ui-components and ui-types
This commit is contained in:
18
scm-ui-components/packages/ui-components/src/Image.js
Normal file
18
scm-ui-components/packages/ui-components/src/Image.js
Normal file
@@ -0,0 +1,18 @@
|
||||
//@flow
|
||||
import React from "react";
|
||||
import { withContextPath } from "./urls";
|
||||
|
||||
type Props = {
|
||||
src: string,
|
||||
alt: string,
|
||||
className?: any
|
||||
};
|
||||
|
||||
class Image extends React.Component<Props> {
|
||||
render() {
|
||||
const { src, alt, className } = this.props;
|
||||
return <img className={className} src={withContextPath(src)} alt={alt} />;
|
||||
}
|
||||
}
|
||||
|
||||
export default Image;
|
||||
Reference in New Issue
Block a user