UNPKG

@feedspring/framer-google-reviews

Version:
75 lines (74 loc) 2.18 kB
import { p as o, a as g, b as l, f as c, c as S, d as y, e as d, s as C, n as v, r as p, g as m, h as f, j as s, W as b, u as j, C as O, i as P } from "./Welcome-8909f8da.js"; import { ControlType as e } from "framer"; import { c as R, C as x } from "./Card-38a3ddfb.js"; import "react"; const k = { feedId: o, items: g, skip: l, fontSettings: { type: e.Object, title: "Font", controls: c }, containerSettings: { type: e.Object, title: "Container", controls: S }, cardSettings: { type: e.Object, title: "Card", controls: R() }, averageRatingSettings: { type: e.Object, title: "Average Rating", controls: y }, avatarSettings: { type: e.Object, title: "Avatar", controls: d() }, starsSettings: { type: e.Object, title: "Stars", controls: C }, nameSettings: { type: e.Object, title: "Name", controls: v() }, reviewSettings: { type: e.Object, title: "Review", controls: p }, dateSettings: { type: e.Object, title: "Date", controls: m() }, separatorSettings: { type: e.Object, title: "Separator", controls: f() } }, A = (t) => { if (!t.settings.feedId) return /* @__PURE__ */ s(b, {}); const { feed: n, items: r } = j(t.settings.feedId, t.settings.items, t.settings.skip); if (!n) return null; const i = t.settings.averageRatingSettings.visible && n.extra && n.extra.total; return /* @__PURE__ */ s(O, { fontSettings: t.settings.fontSettings, containerSettings: t.settings.containerSettings, footer: i && /* @__PURE__ */ s(P, { total: n.extra.total, averageRating: n.extra.averageRating, settings: t.settings.averageRatingSettings }), children: r == null ? void 0 : r.map((a) => /* @__PURE__ */ s(x, { review: a, extra: n.extra, cardSettings: t.settings.cardSettings, avatarSettings: t.settings.avatarSettings, starsSettings: t.settings.starsSettings, nameSettings: t.settings.nameSettings, reviewSettings: t.settings.reviewSettings, dateSettings: t.settings.dateSettings, separatorSettings: t.settings.separatorSettings }, a.id)) }); }; export { A as Component, k as propertyControls };