Grafana-UI: FieldValidationMessage tweaks (#27246)

* Grafana-UI: Export FieldValidationMessage

* Grafana-UI: Add alert role to FieldValidationMessage
This commit is contained in:
Alex Khomenko 2020-08-27 16:35:01 +03:00 committed by GitHub
parent 005e048c01
commit 8238c46350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export const FieldValidationMessage: React.FC<FieldValidationMessageProps> = ({
const styles = getFieldValidationMessageStyles(theme);
return (
<div className={cx(styles.fieldValidationMessage, className)}>
<div role="alert" className={cx(styles.fieldValidationMessage, className)}>
<Icon className={styles.fieldValidationMessageIcon} name="exclamation-triangle" />
{children}
</div>

View File

@ -143,6 +143,7 @@ export { Label } from './Forms/Label';
export { Field } from './Forms/Field';
export { Legend } from './Forms/Legend';
export { FieldSet } from './Forms/FieldSet';
export { FieldValidationMessage } from './Forms/FieldValidationMessage';
export { default as resetSelectStyles } from './Select/resetSelectStyles';
export * from './Select/Select';