diff --git a/packages/components/src/XComponent.tsx b/packages/components/src/XComponent.tsx new file mode 100644 index 0000000000..fc08b4e3a9 --- /dev/null +++ b/packages/components/src/XComponent.tsx @@ -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
>( + Component: React.ComponentType
+): React.ComponentType
{ + return Component; +} + +export default createXComponent; diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 2b0ff450a6..288cb0f527 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -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';