@tbbn/widget-offer-modal
v0.1.0
Published
Embeddable offer-creation modal.
Readme
@tbbn/widget-offer-modal
Status: WORKING.
<tbbn-offer-modal> — offer-creation modal. Exposes open()/close() so
<tbbn-trade-button modal-selector="..."> can drive it directly.
<script type="module" src="https://cdn.tbbnetwork.com/widgets/tbbn-offer-modal.js"></script>
<tbbn-offer-modal
id="offer-modal"
api-base-url="https://api.tbbnetwork.com"
access-token="..."
from-seller-id="..."
to-seller-id="..."
their-listing-id="..."
my-listing-ids="listing-1,listing-2"
></tbbn-offer-modal>my-listing-ids is host-supplied (a comma list of the current seller's own listing ids) rather
than fetched by the widget — resolving "the current seller's own listings" needs the seller's
auth context, which the host page already has from its own session.
Attributes
from-seller-id,to-seller-id,their-listing-id,my-listing-ids(required to submit)api-base-url,api-key/access-token
Events
tbbn-offer-created—detailis the createdOffer.
Depends on
@tbbn/widget-core.
