mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
FormField: removes theme model since its not used in styles (#33632)
This commit is contained in:
parent
0006765a40
commit
43fd829565
@ -1,9 +1,7 @@
|
|||||||
import React, { InputHTMLAttributes, FunctionComponent } from 'react';
|
import React, { InputHTMLAttributes, FunctionComponent } from 'react';
|
||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { GrafanaTheme } from '@grafana/data';
|
|
||||||
import { InlineFormLabel } from '../FormLabel/FormLabel';
|
import { InlineFormLabel } from '../FormLabel/FormLabel';
|
||||||
import { PopoverContent } from '../Tooltip/Tooltip';
|
import { PopoverContent } from '../Tooltip/Tooltip';
|
||||||
import { useStyles } from '../../themes';
|
|
||||||
|
|
||||||
export interface Props extends InputHTMLAttributes<HTMLInputElement> {
|
export interface Props extends InputHTMLAttributes<HTMLInputElement> {
|
||||||
label: string;
|
label: string;
|
||||||
@ -32,7 +30,7 @@ export const FormField: FunctionComponent<Props> = ({
|
|||||||
className,
|
className,
|
||||||
...inputProps
|
...inputProps
|
||||||
}) => {
|
}) => {
|
||||||
const styles = useStyles(getStyles);
|
const styles = getStyles();
|
||||||
return (
|
return (
|
||||||
<div className={cx(styles.formField, className)}>
|
<div className={cx(styles.formField, className)}>
|
||||||
<InlineFormLabel width={labelWidth} tooltip={tooltip}>
|
<InlineFormLabel width={labelWidth} tooltip={tooltip}>
|
||||||
@ -48,7 +46,7 @@ export const FormField: FunctionComponent<Props> = ({
|
|||||||
FormField.displayName = 'FormField';
|
FormField.displayName = 'FormField';
|
||||||
FormField.defaultProps = defaultProps;
|
FormField.defaultProps = defaultProps;
|
||||||
|
|
||||||
const getStyles = (theme: GrafanaTheme) => {
|
const getStyles = () => {
|
||||||
return {
|
return {
|
||||||
formField: css`
|
formField: css`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
Reference in New Issue
Block a user