Commit e932d5bb by Alex Khomenko Committed by GitHub

Grafana-UI: Update tooltip type (#31310)

parent 04cd9634
...@@ -3,6 +3,7 @@ import React, { InputHTMLAttributes, FunctionComponent } from 'react'; ...@@ -3,6 +3,7 @@ import React, { InputHTMLAttributes, FunctionComponent } from 'react';
import { FormField } from '../FormField/FormField'; import { FormField } from '../FormField/FormField';
import { Button } from '../Button/Button'; import { Button } from '../Button/Button';
import { css, cx } from 'emotion'; import { css, cx } from 'emotion';
import { PopoverContent } from '../Tooltip/Tooltip';
export interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onReset'> { export interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onReset'> {
// Function to use when reset is clicked. Means you have to reset the input value yourself as this is uncontrolled // Function to use when reset is clicked. Means you have to reset the input value yourself as this is uncontrolled
...@@ -11,7 +12,7 @@ export interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onRe ...@@ -11,7 +12,7 @@ export interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onRe
isConfigured: boolean; isConfigured: boolean;
label?: string; label?: string;
tooltip?: string; tooltip?: PopoverContent;
labelWidth?: number; labelWidth?: number;
inputWidth?: number; inputWidth?: number;
// Placeholder of the input field when in non configured state. // Placeholder of the input field when in non configured state.
...@@ -50,7 +51,7 @@ export const SecretFormField: FunctionComponent<Props> = ({ ...@@ -50,7 +51,7 @@ export const SecretFormField: FunctionComponent<Props> = ({
return ( return (
<FormField <FormField
label={label!} label={label!}
tooltip={tooltip!} tooltip={tooltip}
labelWidth={labelWidth} labelWidth={labelWidth}
inputEl={ inputEl={
isConfigured ? ( isConfigured ? (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment