mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 12:57:06 +02:00
all the lints
This commit is contained in:
@@ -10,7 +10,7 @@ interface IProps {
|
||||
disabled?: boolean;
|
||||
id?: string;
|
||||
onClick?: (e: React.MouseEvent<HTMLElement>) => any;
|
||||
style?: object;
|
||||
style?: any;
|
||||
text: string;
|
||||
tooltip?: string;
|
||||
}
|
||||
@@ -33,11 +33,8 @@ export function AccordionButton(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
// Tooltip will be set using inner HTML
|
||||
let tooltipMarkup: IInnerHTMLMarkup | null;
|
||||
if (hasTooltip) {
|
||||
tooltipMarkup = {
|
||||
__html: props.tooltip!,
|
||||
}
|
||||
const tooltipMarkup: IInnerHTMLMarkup = {
|
||||
__html: props.tooltip ? props.tooltip : "",
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -45,7 +42,7 @@ export function AccordionButton(props: IProps): React.ReactElement {
|
||||
{props.text}
|
||||
{
|
||||
hasTooltip &&
|
||||
<span className={"tooltiptext"} dangerouslySetInnerHTML={tooltipMarkup!}></span>
|
||||
<span className={"tooltiptext"} dangerouslySetInnerHTML={tooltipMarkup}></span>
|
||||
}
|
||||
</button>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user