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,40 @@
|
||||
import * as React from "react";
|
||||
|
||||
import { Tooltip } from "@dndbeyond/character-common-components/es";
|
||||
import { CharacterTheme } from "@dndbeyond/character-rules-engine/es";
|
||||
|
||||
import { DarkModePositiveImmunitySvg, PositiveImmunitySvg } from "../../Svg";
|
||||
|
||||
interface SvgInjectedProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
className: string;
|
||||
theme?: CharacterTheme;
|
||||
secondaryFill?: string;
|
||||
}
|
||||
export default class ImmunityIcon extends React.PureComponent<Props> {
|
||||
static defaultProps = {
|
||||
title: "Immunity",
|
||||
className: "",
|
||||
theme: {},
|
||||
};
|
||||
|
||||
render() {
|
||||
const { title, className, theme } = this.props;
|
||||
|
||||
let classNames: Array<string> = [className, "ddbc-immunity-icon"];
|
||||
|
||||
let SvgIcon: React.ComponentType<SvgInjectedProps> = theme?.isDarkMode
|
||||
? DarkModePositiveImmunitySvg
|
||||
: PositiveImmunitySvg;
|
||||
|
||||
return (
|
||||
<Tooltip title={title} isDarkMode={theme?.isDarkMode}>
|
||||
<SvgIcon className={classNames.join(" ")} />
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user