mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
add tooltip prop and fix folder name (#22901)
* add tooltip prop and fix folder name * fix folder name refs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { HttpSettingsProps } from './types';
|
||||
import { FormField } from '../FormField/FormField';
|
||||
import { SecretFormField } from '../SecretFormFied/SecretFormField';
|
||||
import { SecretFormField } from '../SecretFormField/SecretFormField';
|
||||
|
||||
export const BasicAuthSettings: React.FC<HttpSettingsProps> = ({ dataSourceConfig, onChange }) => {
|
||||
const password = dataSourceConfig.secureJsonData ? dataSourceConfig.secureJsonData.basicAuthPassword : '';
|
||||
|
||||
@@ -4,7 +4,7 @@ import uniqueId from 'lodash/uniqueId';
|
||||
import { DataSourceSettings } from '@grafana/data';
|
||||
import { Button } from '../Button';
|
||||
import { FormField } from '../FormField/FormField';
|
||||
import { SecretFormField } from '../SecretFormFied/SecretFormField';
|
||||
import { SecretFormField } from '../SecretFormField/SecretFormField';
|
||||
import { stylesFactory } from '../../themes';
|
||||
|
||||
export interface CustomHeader {
|
||||
|
||||
@@ -10,6 +10,7 @@ interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onReset'> {
|
||||
isConfigured: boolean;
|
||||
|
||||
label?: string;
|
||||
tooltip?: string;
|
||||
labelWidth?: number;
|
||||
inputWidth?: number;
|
||||
// Placeholder of the input field when in non configured state.
|
||||
@@ -40,6 +41,7 @@ export const SecretFormField: FunctionComponent<Props> = ({
|
||||
inputWidth = 12,
|
||||
onReset,
|
||||
isConfigured,
|
||||
tooltip,
|
||||
placeholder = 'Password',
|
||||
...inputProps
|
||||
}: Props) => {
|
||||
@@ -47,6 +49,7 @@ export const SecretFormField: FunctionComponent<Props> = ({
|
||||
return (
|
||||
<FormField
|
||||
label={label!}
|
||||
tooltip={tooltip!}
|
||||
labelWidth={labelWidth}
|
||||
inputEl={
|
||||
isConfigured ? (
|
||||
@@ -20,7 +20,7 @@ export { Cascader, CascaderOption } from './Cascader/Cascader';
|
||||
// Forms
|
||||
export { FormLabel } from './FormLabel/FormLabel';
|
||||
export { FormField } from './FormField/FormField';
|
||||
export { SecretFormField } from './SecretFormFied/SecretFormField';
|
||||
export { SecretFormField } from './SecretFormField/SecretFormField';
|
||||
|
||||
export { LoadingPlaceholder } from './LoadingPlaceholder/LoadingPlaceholder';
|
||||
export { ColorPicker, SeriesColorPicker } from './ColorPicker/ColorPicker';
|
||||
|
||||
Reference in New Issue
Block a user