以下是Eventbrite提供的“嵌入代码”。 如何在我的React组件中使用它?
<div id="eventbrite-widget-container-12345678901"></div>
<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"></script>
<script type="text/javascript">
var exampleCallback = function() {
console.log('Order complete!');
};
window.EBWidgets.createWidget({
// Required
widgetType: 'checkout',
eventId: '12345678901',
iframeContainerId: 'eventbrite-widget-container-69831741619',
// Optional
iframeContainerHeight: 425, // Widget height in pixels. Defaults to a minimum of 425px if not provided
onOrderComplete: exampleCallback // Method called when an order has successfully completed
});
</script>