You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and the SomeReactComponent is just a react component for a dynamic image renderer that looks like this
import like from './like.png';
import love from './love.png';
import neutral from './neutral.png';
class SomeReactComponent extends Component {
getImage(pic) {
const image = pic;
return image;
}
render() {
const pic = [love, like, neutral];
return (
<div>
{ sentimentsArray.map(sentiment =>
<img src={this.getImage(pic)} style={{ width: '75%', height: '75%', objectFit: 'scale-down' }} />
)}
</div>
);
}
}
When i call this.player.overlay in my console, it says the overlays.options.content is a Symbol of React.element, however, I'm not getting anything as an overlay
The text was updated successfully, but these errors were encountered:
what i did was.
const plainHtml = SomeReactComponent();
and then.
this.player.overlay({
content: renderToStaticMarkup(plainHtml),
align: 'bottom-left',
overlays: [{
start: 'play',
end: 'end'
}]
});
the problem with this approach is that buttons inside the plainHtml wont work as expected. if you guys have a better way, let me know. thanks
Hello! I was wondering, is it possible to add a react component as the content?
I added the component inside the overlay like so -
and the SomeReactComponent is just a react component for a dynamic image renderer that looks like this
When i call this.player.overlay in my console, it says the overlays.options.content is a Symbol of React.element, however, I'm not getting anything as an overlay
The text was updated successfully, but these errors were encountered: