UI: Remove deprecated getFormStyles function (#49945)

This commit is contained in:
kay delaney 2022-06-01 09:57:53 +01:00 committed by GitHub
parent b6a329c268
commit 05e501c641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 32 deletions

View File

@ -1,31 +0,0 @@
import { GrafanaTheme2 } from '@grafana/data';
import { stylesFactory } from '../../themes';
import { ComponentSize } from '../../types/size';
import { getButtonStyles, ButtonVariant } from '../Button';
import { getInputStyles } from '../Input/Input';
import { getCheckboxStyles } from './Checkbox';
import { getFieldValidationMessageStyles } from './FieldValidationMessage';
import { getLabelStyles } from './Label';
import { getLegendStyles } from './Legend';
/** @deprecated */
export const getFormStyles = stylesFactory(
(theme: GrafanaTheme2, options: { variant: ButtonVariant; size: ComponentSize; invalid: boolean }) => {
console.warn('getFormStyles is deprecated');
return {
label: getLabelStyles(theme),
legend: getLegendStyles(theme.v1),
fieldValidationMessage: getFieldValidationMessageStyles(theme),
button: getButtonStyles({
theme,
variant: options.variant,
size: options.size,
}),
input: getInputStyles({ theme, invalid: options.invalid }),
checkbox: getCheckboxStyles(theme),
};
}
);

View File

@ -190,7 +190,6 @@ export { InputControl } from './InputControl';
export { Button, LinkButton, ButtonVariant, ToolbarButton, ButtonGroup, ToolbarButtonRow, ButtonProps } from './Button';
export { ValuePicker } from './ValuePicker/ValuePicker';
export { fieldMatchersUI } from './MatchersUI/fieldMatchersUI';
export { getFormStyles } from './Forms/getFormStyles';
export { Link } from './Link/Link';
export { Label } from './Forms/Label';