bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/generic-component-content/generic-component-item/component.tsx
Guilherme Pereira Leme c6391b3986
feat(plugin): add generic component to extensible areas list and layout.set to uiCommands (#19582)
* [plugin-sdk-generic-component] - generic component extensible area and ui command layout set

* [plugin-generic-component] -  update sdk

* [plugin-generic-component] -  fix lint errors

* [plugin-generic-component] - fix problem warned by CI tests
2024-02-19 07:59:45 -03:00

27 lines
547 B
TypeScript

import React, { useEffect, useRef } from 'react';
import { GenericComponentItemProps } from './types';
const GenericComponentItem: React.FC<GenericComponentItemProps> = (props) => {
const {
renderFunction,
} = props;
const elementRef = useRef(null);
useEffect(() => {
if (elementRef.current && renderFunction) {
renderFunction(elementRef.current);
}
}, [elementRef]);
return (
<div
style={{
overflow: 'hidden',
}}
ref={elementRef}
/>
);
};
export default GenericComponentItem;