Types: LegalFeedSection to ContentBadgeProps
The types of @poltura/theme-sdk/content, LegalFeedSection to ContentBadgeProps.
Ezen az oldalon
import { … } from '@poltura/theme-sdk/content';LegalFeedSection
A section the store's product feeds add to a legal document, such as the data shared with a price comparison site.
idrequiredstringThe section's stable key.
titlerequiredstringThe section heading.
effectiverequiredstringWhen the section took effect, already worded.
paragraphsrequiredreadonly string[]The section's paragraphs, as plain text.
LegalPage
The legal document a legal page shows, such as the terms of service or the privacy policy.
slugrequiredstringThe document's address segment, such as `terms-of-service`.
titlerequiredstringThe document's title.
markdownrequiredstringThe document's body in Markdown; render it with `Markdown`.
effectiveLabelrequiredstring | nullWhen this version took effect, already worded, or null.
feedSectionsrequiredreadonly LegalFeedSection[]Sections the store's product feeds add after the body.
isOlderVersionrequiredbooleanWhether the page shows an earlier version rather than the one in force.
currentHrefrequiredstringThe page of the version in force.
previousVersionsrequiredreadonly LegalVersion[]Earlier versions, newest first.
textsrequiredLegalPageTextsThe page's fixed wording in the page language.
LegalPageTexts
The fixed wording of a legal page.
olderVersionrequiredstringThe notice shown on an earlier version.
viewCurrentVersionrequiredstringThe link from an earlier version to the version in force.
previousVersionsrequiredstringThe heading of the earlier versions list.
LegalVersion
An earlier version of a legal document, still readable on its own address.
idrequiredstringThe version's id.
labelrequiredstringThe version's name, such as `Version 3`.
effectiveFromrequiredstring | nullWhen the version took effect, already formatted, or null.
hrefrequiredstringThe version's page.
ProductFile
A file the product's buyers download after purchase; before purchase it is listed without a link.
idrequiredstringThe file's id.
titlerequiredstringThe name shown to shoppers, such as `Office 2024 installer`.
fileNamerequiredstringThe file name buyers download, such as `office-2024.exe`.
mimeTyperequiredstringThe file's MIME type.
sizeBytesrequirednumberThe file size in bytes.
versionrequiredstring | nullThe version the file is for, or null.
languagerequiredstring | nullThe language the file is in: a language code such as `hu`, `multi` for several languages, or null.
variantIdrequiredstring | nullThe variant whose buyers get it, or null when every variant's buyers do.
RichTextValue
Merchant-written rich text, already sanitised by the host; render it with RichText.
htmlrequiredstringThe sanitised HTML.
MarkdownProps
Props of Markdown.
sourcerequiredstringThe Markdown to draw; raw HTML in it is sanitised.
density'regular' | 'compact'Tighter spacing, for short answers inside cards.
classNamestringClasses added to the wrapper.
RichTextProps
Props of RichText.
valuerequiredRichTextValue | nullThe sanitised rich text, or null to draw nothing.
classNamestringClasses added to the wrapper.
ArticleCardProps
Props of ArticleCard.
articlerequiredArticleSummaryThe post to show.
readLabelrequiredstringThe call to read the post, such as `Read article`.
variant'default' | 'featured'A featured card gets the larger title and image.
showDatebooleanWhether the publication date shows; defaults to true.
showExcerptbooleanWhether the excerpt shows; defaults to true.
FaqAccordionProps
Props of FaqAccordion.
itemsrequiredreadonly FaqItem[]The questions, in order.
BannerTemplate
Which ready-made design a banner started from.
type BannerTemplate = 'announcement' | 'ageGate' | 'newsletter' | 'discount' | 'slideInPromo' | 'maintenance' | 'comingSoon' | 'blank'BannerLayout
How a banner shows: a bar, a dialog, a panel sliding in, or the whole screen.
type BannerLayout = 'bar' | 'modal' | 'slideIn' | 'fullscreen'BannerPosition
Where on the screen a banner sits.
type BannerPosition = 'top' | 'bottom' | 'center' | 'bottomLeft' | 'bottomRight'BannerAction
What a banner button does when pressed.
type BannerAction = 'link' | 'dismiss' | 'accept' | 'decline'BannerButton
A button of a banner.
labelrequiredstringThe button label.
actionrequiredBannerActionWhat the button does.
hrefrequiredstringWhere a `link` button goes; empty for the other actions.
BannerColors
The colours a banner draws with, each a CSS colour or empty for the theme's own.
backgroundrequiredstringThe background.
textrequiredstringThe text.
accentrequiredstringThe buttons and highlights.
accentTextrequiredstringText on the accent colour.
Banner
A banner the merchant set up, such as an announcement or a discount offer, in the page language.
idrequiredstringThe banner's id.
namerequiredstringThe merchant's name for it, never shown to shoppers.
templaterequiredBannerTemplateThe design it started from.
layoutrequiredBannerLayoutHow it shows.
positionrequiredBannerPositionWhere it sits.
eyebrowrequiredstringThe small line above the heading.
headingrequiredstringThe heading.
bodyrequiredstringThe body text.
noterequiredstringThe small print under the body.
imagerequiredMediaImageRef | nullThe picture, or null.
primaryrequiredBannerButton | nullThe main button, or null.
secondaryrequiredBannerButton | nullThe second button, or null.
coderequiredstring | nullThe discount code it shows, or null.
countdownTorequiredstring | nullWhen its countdown ends, as an ISO 8601 string, or null without a countdown.
colorsrequiredBannerColorsThe colours it draws with.
CountdownTime
Time left until a moment, ticking every second.
daysrequirednumberWhole days left.
hoursrequirednumberHours left after the days.
minutesrequirednumberMinutes left after the hours.
secondsrequirednumberSeconds left after the minutes.
expiredrequiredbooleanWhether the moment has passed.
validrequiredbooleanWhether the moment could be read; false for an empty or broken value.
CountdownProps
Props of Countdown.
hoursrequirednumberHours left.
minutesrequirednumberMinutes left after the hours.
secondsrequirednumberSeconds left after the minutes.
classNamestringClasses added to the wrapper.
ContentBadgeProps
Props of ContentBadge.
iconReactNodeAn icon before the label.
labelstringThe label.
variant'overlay' | 'muted'`overlay` sits on pictures, `muted` on the page; `overlay` when omitted.
classNamestringClasses added to the badge.