Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import * as React from "react";
|
||||
|
||||
interface Props {
|
||||
className: string;
|
||||
viewBox: string;
|
||||
preserveAspectRatio?: string;
|
||||
}
|
||||
|
||||
export default class BaseSvg extends React.PureComponent<Props> {
|
||||
static defaultProps = {
|
||||
className: "",
|
||||
viewBox: "0 0 100 100",
|
||||
};
|
||||
|
||||
render() {
|
||||
const { className, viewBox, children, preserveAspectRatio } = this.props;
|
||||
|
||||
let classNames: Array<string> = ["ddbc-svg", className];
|
||||
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox={viewBox}
|
||||
className={classNames.join(" ")}
|
||||
preserveAspectRatio={preserveAspectRatio}
|
||||
>
|
||||
{children}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user