New source found from dndbeyond.com
This commit is contained in:
+10
-4
@@ -2,15 +2,21 @@ import React from "react";
|
||||
|
||||
import { BaseSvgProps } from "../../BaseSvg";
|
||||
|
||||
export default class AnimatedLoadingRingSvg extends React.PureComponent<BaseSvgProps> {
|
||||
interface AnimatedLoadingRingSvgProps extends BaseSvgProps {
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
||||
export default class AnimatedLoadingRingSvg extends React.PureComponent<AnimatedLoadingRingSvgProps> {
|
||||
static defaultProps = {
|
||||
fillColor: "#EC2127",
|
||||
secondaryFillColor: "#131315",
|
||||
backgroundColor: "transparent",
|
||||
className: "",
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fillColor, secondaryFillColor, className } = this.props;
|
||||
const { fillColor, secondaryFillColor, backgroundColor, className } =
|
||||
this.props;
|
||||
|
||||
let classNames: Array<string> = ["ddbc-animated-loading-ring-svg"];
|
||||
|
||||
@@ -18,7 +24,7 @@ export default class AnimatedLoadingRingSvg extends React.PureComponent<BaseSvgP
|
||||
classNames.push(className);
|
||||
}
|
||||
|
||||
const htmlContent: string = `<html><head><style>* {margin:0}</style></head><body style="background-color: transparent;">
|
||||
const htmlContent: string = `<html><head><style>* {margin:0}</style></head><body style="background-color: ${backgroundColor};">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-ring-alt">
|
||||
<rect x="0" y="0" width="100" height="100" fill="none" class="bk"/>
|
||||
<circle cx="50" cy="50" r="40" stroke="${secondaryFillColor}" fill="none" stroke-width="10" stroke-linecap="round"/>
|
||||
@@ -33,7 +39,7 @@ export default class AnimatedLoadingRingSvg extends React.PureComponent<BaseSvgP
|
||||
className={classNames.join(" ")}
|
||||
frameBorder="0"
|
||||
title="loading"
|
||||
style={{ backgroundColor: "transparent" }}
|
||||
style={{ backgroundColor: backgroundColor }}
|
||||
src={`data:text/html;base64,${btoa(htmlContent)}`}
|
||||
></iframe>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user