Initial commit from prod-batam

This commit is contained in:
mario
2025-05-27 10:51:12 +07:00
commit 025b96229b
3361 changed files with 304068 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import getSvg from './getSvg';
const Svg = ({ name, ...otherProps }) => {
return <React.Fragment>{getSvg(name, { ...otherProps })}</React.Fragment>;
};
Svg.propTypes = {
name: PropTypes.string.isRequired,
};
export default Svg;

View File

@@ -0,0 +1,22 @@
import React from 'react';
// Svgs
import { ReactComponent as logoOhif } from './../../assets/svgs/ohif-logo.svg';
const SVGS = {
'logo-ohif': logoOhif,
};
/**
* Return the matching SVG as a React Component.
* Results in an inlined SVG Element. If there's no match,
* return `null`
*/
export default function getSvg(key, props) {
if (!key || !SVGS[key]) {
return React.createElement('div', null, 'Missing SVG');
}
return React.createElement(SVGS[key], props);
}
export { SVGS };

View File

@@ -0,0 +1,2 @@
import Svg from './Svg';
export default Svg;