import * as React from "react"; import { Tooltip } from "@dndbeyond/character-common-components/es"; import { Action, ActionUtils, CharacterTheme, } from "@dndbeyond/character-rules-engine/es"; interface Props { action: Action; onClick?: (action: Action) => void; className: string; theme?: CharacterTheme; } export default class ActionName extends React.PureComponent { static defaultProps = { className: "", }; handleClick = (evt: React.MouseEvent): void => { const { onClick, action } = this.props; if (onClick) { evt.stopPropagation(); evt.nativeEvent.stopImmediatePropagation(); onClick(action); } }; render() { const { action, className, theme } = this.props; let isCustomized = ActionUtils.isCustomized(action); let classNames: Array = [className, "ddbc-action-name"]; return ( {ActionUtils.getName(action)} {isCustomized && ( * )} ); } }