Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure correct display name for forwardRef components #3440

Merged
merged 4 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/badge/badge_group/badge_group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface EuiBadgeGroupProps {
children?: ReactNode;
}

export const EuiBadgeGroup = React.forwardRef<
const EuiBadgeGroup = React.forwardRef<
HTMLDivElement,
CommonProps & HTMLAttributes<HTMLDivElement> & EuiBadgeGroupProps
>(
Expand All @@ -65,3 +65,6 @@ export const EuiBadgeGroup = React.forwardRef<
);
}
);

EuiBadgeGroup.displayName = 'EuiBadgeGroup';
export { EuiBadgeGroup };
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Props = CommonProps &

export type EuiHeaderSectionItemButtonRef = HTMLButtonElement;

export const EuiHeaderSectionItemButton = React.forwardRef<
const EuiHeaderSectionItemButton = React.forwardRef<
EuiHeaderSectionItemButtonRef,
PropsWithChildren<Props>
>(
Expand Down Expand Up @@ -74,3 +74,6 @@ export const EuiHeaderSectionItemButton = React.forwardRef<
);
}
);

EuiHeaderSectionItemButton.displayName = 'EuiHeaderSectionItemButton';
export { EuiHeaderSectionItemButton };
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports[`EuiTabbedContent behavior when uncontrolled, the selected tab should up
}
>
<div>
<ForwardRef
<EuiTabs
onFocus={[Function]}
>
<div
Expand Down Expand Up @@ -135,7 +135,7 @@ exports[`EuiTabbedContent behavior when uncontrolled, the selected tab should up
</button>
</EuiTab>
</div>
</ForwardRef>
</EuiTabs>
<div
aria-labelledby="kibana"
id="42"
Expand Down
8 changes: 4 additions & 4 deletions src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ export type EuiTabsProps = CommonProps &

export type EuiTabRef = HTMLDivElement;

export const EuiTabs = React.forwardRef<
EuiTabRef,
PropsWithChildren<EuiTabsProps>
>(
const EuiTabs = React.forwardRef<EuiTabRef, PropsWithChildren<EuiTabsProps>>(
(
{
children,
Expand Down Expand Up @@ -87,3 +84,6 @@ export const EuiTabs = React.forwardRef<
);
}
);

EuiTabs.displayName = 'EuiTabs';
export { EuiTabs };