Forms: Fixed form style issues due to recent style changes (#23421)

* Forms: Fixed form style issues due to recent style changes

* Removed unused import
This commit is contained in:
Torkel Ödegaard 2020-04-08 10:14:03 +02:00 committed by GitHub
parent a3b581a5f3
commit 6779033bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 19 deletions

View File

@ -9,7 +9,7 @@ import { Editor } from '@grafana/slate-react';
import { Value } from 'slate';
import Plain from 'slate-plain-serializer';
import { Popper as ReactPopper } from 'react-popper';
import { css, cx } from 'emotion';
import { css } from 'emotion';
import { SlatePrism } from '../../slate-plugins';
import { SCHEMA } from '../../utils/slate';
@ -119,15 +119,7 @@ export const DataLinkInput: React.FC<DataLinkInputProps> = memo(
};
return (
<div
className={cx(
'gf-form-input',
css`
position: relative;
height: auto;
`
)}
>
<div className="slate-query-field__wrapper">
<div className="slate-query-field">
{showingSuggestions && (
<Portal>

View File

@ -1,6 +1,7 @@
import omit from 'lodash/omit';
import React, { InputHTMLAttributes, FunctionComponent } from 'react';
import { FormField } from '../FormField/FormField';
import { Button } from '../Button/Button';
import { css, cx } from 'emotion';
interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onReset'> {
@ -61,13 +62,9 @@ export const SecretFormField: FunctionComponent<Props> = ({
value="configured"
{...omit(inputProps, 'value')}
/>
<button
className={cx('btn btn-secondary gf-form-btn', styles.noRadiusButton)}
onClick={onReset}
style={{ height: '100%' }}
>
reset
</button>
<Button onClick={onReset} variant="secondary">
Reset
</Button>
</>
) : (
<input

View File

@ -91,7 +91,6 @@ export class TagsInput extends PureComponent<Props, State> {
addButtonStyle: css`
margin-left: 8px;
margin-top: 2px;
`,
}));
@ -106,7 +105,7 @@ export class TagsInput extends PureComponent<Props, State> {
)}
>
<Input placeholder="Add Name" onChange={this.onNameChange} value={newTag} onKeyUp={this.onKeyboardAdd} />
<Button className={getStyles().addButtonStyle} onClick={this.onAdd} variant="primary" size="md">
<Button className={getStyles().addButtonStyle} onClick={this.onAdd} variant="secondary" size="md">
Add
</Button>
</div>