From: Grégoire Aubert Date: Mon, 26 Mar 2018 14:32:45 +0000 (+0200) Subject: VSTS-141 Add missing typings for rc-tooltip X-Git-Tag: 7.5~1474 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a45449c42d53417951053302247a7e37c86f63c3;p=sonarqube.git VSTS-141 Add missing typings for rc-tooltip --- diff --git a/server/sonar-vsts/src/main/js/typings/rc-tooltip.d.ts b/server/sonar-vsts/src/main/js/typings/rc-tooltip.d.ts new file mode 100644 index 00000000000..999b5b02c84 --- /dev/null +++ b/server/sonar-vsts/src/main/js/typings/rc-tooltip.d.ts @@ -0,0 +1,54 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +declare module 'rc-tooltip' { + export type Trigger = 'hover' | 'click' | 'focus'; + export type Placement = + | 'left' + | 'right' + | 'top' + | 'bottom' + | 'topLeft' + | 'topRight' + | 'bottomLeft' + | 'bottomRight'; + + export interface Props extends React.Props { + overlayClassName?: string; + trigger?: Trigger[]; + mouseEnterDelay?: number; + mouseLeaveDelay?: number; + overlayStyle?: React.CSSProperties; + prefixCls?: string; + transitionName?: string; + onVisibleChange?: () => void; + visible?: boolean; + defaultVisible?: boolean; + placement?: Placement | Object; + align?: Object; + onPopupAlign?: (popupDomNode: Element, align: Object) => void; + overlay: React.ReactNode; + arrowContent?: React.ReactNode; + getTooltipContainer?: () => Element; + destroyTooltipOnHide?: boolean; + } + + // the next line is crucial, it is absent in the original typings + export default class Tooltip extends React.Component {} +}