plebdevs/src/components/zaps/ZapDisplay.js

19 lines
563 B
JavaScript
Raw Normal View History

2024-04-22 19:09:46 -05:00
import React, { useRef } from 'react';
import { OverlayPanel } from 'primereact/overlaypanel';
import ZapForm from './ZapForm';
const ZapDisplay = ({ zapAmount, event }) => {
const op = useRef(null);
return (
<>
<p className="text-xs cursor-pointer" onClick={(e) => op.current.toggle(e)}>
<i className="pi pi-bolt text-yellow-300"></i> {zapAmount}
</p>
<OverlayPanel ref={op}>
<ZapForm event={event} />
</OverlayPanel>
</>
)
}
export default ZapDisplay;