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

fix: Add createXComponent stub for support in Grizzly #2319

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 15 additions & 0 deletions packages/components/src/XComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

/**
* Stub of a helper function to wrap a component with a replacement component. In this case though, it will just return the original component.
*
* @param Component The component to wrap
* @returns The wrapped component
*/
export function createXComponent<P extends Record<string, unknown>>(
Component: React.ComponentType<P>
): React.ComponentType<P> {
return Component;
}

export default createXComponent;
1 change: 1 addition & 0 deletions packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ export { default as TimeSlider } from './TimeSlider';
export { default as ToastNotification } from './ToastNotification';
export * from './UIConstants';
export { default as UISwitch } from './UISwitch';
export * from './XComponent';
Loading