Skip to content

Commit

Permalink
fix: Add createXComponent stub for support in Grizzly (#2319)
Browse files Browse the repository at this point in the history
- Just stub it out so deephaven.ui v0.22 works in Grizzly
- Prerequisite for DH-18058
  • Loading branch information
mofojed authored Dec 17, 2024
1 parent b68c6d6 commit c5c8630
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
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';

0 comments on commit c5c8630

Please sign in to comment.