Skip to content

Commit

Permalink
Merge pull request #790 from vrk-kpa/hotfix/alert-component-refs
Browse files Browse the repository at this point in the history
[Hotfix] Alert and InlineAlert refs
  • Loading branch information
LJKaski committed Oct 25, 2023
1 parent 28a8cf6 commit 4dd86a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class BaseAlert extends Component<AlertProps> {
closeText,
onCloseButtonClick,
smallScreen,
forwardedRef,
closeButtonProps = {},
...rest
} = this.props;
Expand All @@ -81,6 +82,7 @@ class BaseAlert extends Component<AlertProps> {
[alertClassNames.smallScreen]: !!smallScreen,
})}
style={{ ...marginStyle, ...passProps?.style }}
ref={forwardedRef}
>
<HtmlDiv className={alertClassNames.styleWrapper}>
{status === 'warning' && (
Expand Down
2 changes: 2 additions & 0 deletions src/core/InlineAlert/InlineAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class BaseInlineAlert extends Component<InlineAlertProps> {
children,
smallScreen,
id,
forwardedRef,
...rest
} = this.props;
const [marginProps, passProps] = separateMarginProps(rest);
Expand All @@ -65,6 +66,7 @@ class BaseInlineAlert extends Component<InlineAlertProps> {
[inlineAlertClassNames.smallScreen]: !!smallScreen,
})}
style={{ ...marginStyle, ...passProps?.style }}
ref={forwardedRef}
>
<HtmlDiv className={inlineAlertClassNames.styleWrapper}>
{status === 'warning' && (
Expand Down

0 comments on commit 4dd86a1

Please sign in to comment.