mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 16:00:09 -04:00
* Add PlainButton * refactor close icons * reorder import * refactor remaining anchors * refactor: replace remaining <button> and TODOs * refactor: changed applicable elements to type link * fix: minor details * bug: fix tooltip ternary * refactor: improve interactivity and semantics of schema list item
14 lines
433 B
TypeScript
14 lines
433 B
TypeScript
import React from "react";
|
|
import AntTooltip, { TooltipProps } from "antd/lib/tooltip";
|
|
import { isNil } from "lodash";
|
|
|
|
export default function Tooltip({ title, ...restProps }: TooltipProps) {
|
|
const liveTitle = !isNil(title) ? (
|
|
<span role="status" aria-live="assertive" aria-relevant="additions">
|
|
{title}
|
|
</span>
|
|
) : null;
|
|
|
|
return <AntTooltip trigger={["hover", "focus"]} title={liveTitle} {...restProps} />;
|
|
}
|