FormField: removes theme model since its not used in styles (#33632)

This commit is contained in:
Uchechukwu Obasi 2021-05-04 15:46:32 +01:00 committed by GitHub
parent 0006765a40
commit 43fd829565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,7 @@
import React, { InputHTMLAttributes, FunctionComponent } from 'react';
import { css, cx } from '@emotion/css';
import { GrafanaTheme } from '@grafana/data';
import { InlineFormLabel } from '../FormLabel/FormLabel';
import { PopoverContent } from '../Tooltip/Tooltip';
import { useStyles } from '../../themes';
export interface Props extends InputHTMLAttributes<HTMLInputElement> {
label: string;
@ -32,7 +30,7 @@ export const FormField: FunctionComponent<Props> = ({
className,
...inputProps
}) => {
const styles = useStyles(getStyles);
const styles = getStyles();
return (
<div className={cx(styles.formField, className)}>
<InlineFormLabel width={labelWidth} tooltip={tooltip}>
@ -48,7 +46,7 @@ export const FormField: FunctionComponent<Props> = ({
FormField.displayName = 'FormField';
FormField.defaultProps = defaultProps;
const getStyles = (theme: GrafanaTheme) => {
const getStyles = () => {
return {
formField: css`
display: flex;