diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b2e54107764..03aeb53caf25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Added `EuiComboBoxOptionOption` prop to `EuiComboBox` props table ([#4563](https://github.com/elastic/eui/pull/4563)) - Allowed dynamically changing the `direction` prop on `EuiResizableContainer` ([#4557](https://github.com/elastic/eui/pull/4557)) - Exported `useIsWithinBreakpoints` hook ([#4557](https://github.com/elastic/eui/pull/4557)) +- Added focus to `EuiForm` error `EuiCallout` ([#4497](https://github.com/elastic/eui/pull/4497)) **Bug fixes** diff --git a/src/components/call_out/call_out.tsx b/src/components/call_out/call_out.tsx index 519cf719e87e..05c1b738b52c 100644 --- a/src/components/call_out/call_out.tsx +++ b/src/components/call_out/call_out.tsx @@ -17,7 +17,7 @@ * under the License. */ -import React, { FunctionComponent, HTMLAttributes, ReactNode } from 'react'; +import React, { forwardRef, Ref, HTMLAttributes, ReactNode } from 'react'; import classNames from 'classnames'; @@ -54,59 +54,65 @@ const sizeToClassNameMap: { [size in Size]: string } = { m: '', }; -export const EuiCallOut: FunctionComponent = ({ - title, - color = 'primary', - size = 'm', - iconType, - children, - className, - heading, - ...rest -}) => { - const classes = classNames( - 'euiCallOut', - colorToClassNameMap[color], - sizeToClassNameMap[size], - className - ); - - let headerIcon; - - if (iconType) { - headerIcon = ( -