0.0.6 • Published 1 year ago

@marketplaces.inc-ui/mpc-pagination v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

src/Card.js:

class: Card, mpc-card

Superclass

NameModulePackage
LitElementlit

Fields

NamePrivacyTypeDefaultDescriptionInherited From
titlepublicstring''Title of the card
subtitlepublicstring''Subtitle of the card, shown above the title if present
hrefpublicstring''When present, clicking the card will route to this string
imagespublicarray[]Array of image urls, only the first image will be shown
loadingpublicbooleanfalseShow the loading state
buttonTextpublicstring''When present, a button is shown at the buttom of the card
currencypublicstring''When present, a currency is shown next to the price
currencySymbolpublicstring'$'The symbol to show before price string. Only used when price is set.
currencyFormatpublicstring'0,0[.]00'The format string to display the price in, see \numeraljs.com\ for a full list of options
darkModepublicstring'disabled'The theme of the card, valid options are `disabled`, `auto` & `active`. The auto strategy uses the `prefers-color-scheme` media feature under the hood, it will not listen for color changes when set to auto
autoFetchpublicbooleanfalseWhen true, autofetch data from the MPC API and apply it. See `autoFetchConfig` for more info.
autoFetchConfigpublicobject{}Auto fetch data for the card when required params are supplied\ `{`\ \ `entityId,`\ \ `entityType,`\ \ `marketplaceId,`\ \ `marketplaceBaseUrl,`\ \ `apiKey,`\ \ `apiBaseUrl,`\ `}` \\ `entityType` options are `listing`
targetpublicTells the browser where to open the link. Only used when href is set.
pricepublicWhen present, a price is shown. Formatted by numeral.js

Methods

NamePrivacyDescriptionParametersReturnInherited From
_handleAutoFetchautoFetch
_handleAutoFetchResponsedata, entityType
_handleSetPropertiesForListingdata
mediaTemplate
loadingTemplate
contentTemplate

Attributes

NameFieldInherited From
titletitle
subtitlesubtitle
imagesimages
loadingloading
hrefhref
targettarget
buttonTextbuttonText
priceprice
currencycurrency
currencySymbolcurrencySymbol
currencyFormatcurrencyFormat
darkModedarkMode
autoFetchautoFetch
autoFetchConfigautoFetchConfig

Exports

KindNameDeclarationModulePackage
jsCardCardsrc/Card.js

mpc-card.js:

Exports

KindNameDeclarationModulePackage
custom-element-definitionmpc-cardCard/src/Card.js