@bikdotai/bik-component-library 0.0.547-beta.kd-2 → 0.0.547-beta.kd-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../avatar/Avatar.js"),t=require("../avatar/AvatarHelper.js"),i=require("../star-rating/StarRating.js"),a=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),o=require("../../assets/icons/card_footer_arraw.svg.js"),n=require("./TestimonialCard.style.js");exports.TestimonialCard=l=>{var c,d
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../avatar/Avatar.js"),t=require("../avatar/AvatarHelper.js"),i=require("../star-rating/StarRating.js"),a=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),o=require("../../assets/icons/card_footer_arraw.svg.js"),n=require("./TestimonialCard.style.js");exports.TestimonialCard=l=>{var c,d;const j=null!==(c=l.version)&&void 0!==c?c:"v1";return e.jsxs(e.Fragment,{children:[e.jsxs(n.TestimonialCardStyle,Object.assign({width:l.width,height:l.height,version:j},{children:[e.jsx(i.StarRating,{starSize:24,maxValue:null!==(d=l.ratingMaxValue)&&void 0!==d?d:5,value:l.ratingValue,onChange:e=>console.log(e),mode:"VIEW",version:j}),e.jsx(a.BodyLarge,Object.assign({color:s.COLORS.content.secondary},{children:l.testimonial})),(()=>{var i;return"v2"==j?e.jsxs(n.TestimonialProfileInfo2,{children:[e.jsx(n.Logo,{src:l.avatarUrl}),e.jsx(a.BodyPrimary,Object.assign({color:s.COLORS.content.secondary},{children:l.reviewerName}))]}):e.jsxs(n.TestimonialProfileCard,{children:[e.jsx(r.Avatar,{type:t.AVATAR_TYPES.IMAGE,size:null!==(i=l.avatarSize)&&void 0!==i?i:t.SIZE.MEDIUM,background:t.AVATAR_BACKGROUND.LIGHT,photoUrl:l.avatarUrl}),e.jsxs(n.TestimonialProfileInfo,{children:[e.jsx(a.TitleMedium,Object.assign({color:s.COLORS.content.secondary},{children:l.reviewerName})),e.jsx(a.BodyPrimary,Object.assign({color:s.COLORS.content.secondary},{children:l.reviewerCaption}))]})]})})()]})),"v2"===j?e.jsxs(n.TestimonialProfileFooter,Object.assign({width:l.width},{children:[e.jsx(n.FooterText,{children:e.jsx(a.TitleRegular,Object.assign({color:s.COLORS.text.white},{children:null==l?void 0:l.footerText}))}),e.jsx(n.FooterStat,{children:e.jsx(a.TitleLarge,Object.assign({color:s.COLORS.text.white},{children:null==l?void 0:l.footerStat}))}),e.jsx(n.FooterArrow,{children:e.jsx(o.default,{})})]})):null]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as r,Fragment as e,jsx as t}from"react/jsx-runtime";import{Avatar as o}from"../avatar/Avatar.js";import{AVATAR_TYPES as i,SIZE as
|
|
1
|
+
import{jsxs as r,Fragment as e,jsx as t}from"react/jsx-runtime";import{Avatar as o}from"../avatar/Avatar.js";import{AVATAR_TYPES as i,SIZE as n,AVATAR_BACKGROUND as a}from"../avatar/AvatarHelper.js";import{StarRating as s}from"../star-rating/StarRating.js";import{BodyLarge as l,BodyPrimary as c,TitleMedium as d,TitleRegular as h,TitleLarge as v}from"../TypographyStyle.js";import{COLORS as m}from"../../constants/Theme.js";import g from"../../assets/icons/card_footer_arraw.svg.js";import{TestimonialCardStyle as j,TestimonialProfileInfo2 as p,Logo as u,TestimonialProfileCard as f,TestimonialProfileInfo as w,TestimonialProfileFooter as b,FooterText as y,FooterStat as O,FooterArrow as x}from"./TestimonialCard.style.js";const S=S=>{var T,I;const M=null!==(T=S.version)&&void 0!==T?T:"v1";return r(e,{children:[r(j,Object.assign({width:S.width,height:S.height,version:M},{children:[t(s,{starSize:24,maxValue:null!==(I=S.ratingMaxValue)&&void 0!==I?I:5,value:S.ratingValue,onChange:r=>console.log(r),mode:"VIEW",version:M}),t(l,Object.assign({color:m.content.secondary},{children:S.testimonial})),(()=>{var e;return"v2"==M?r(p,{children:[t(u,{src:S.avatarUrl}),t(c,Object.assign({color:m.content.secondary},{children:S.reviewerName}))]}):r(f,{children:[t(o,{type:i.IMAGE,size:null!==(e=S.avatarSize)&&void 0!==e?e:n.MEDIUM,background:a.LIGHT,photoUrl:S.avatarUrl}),r(w,{children:[t(d,Object.assign({color:m.content.secondary},{children:S.reviewerName})),t(c,Object.assign({color:m.content.secondary},{children:S.reviewerCaption}))]})]})})()]})),"v2"===M?r(b,Object.assign({width:S.width},{children:[t(y,{children:t(h,Object.assign({color:m.text.white},{children:null==S?void 0:S.footerText}))}),t(O,{children:t(v,Object.assign({color:m.text.white},{children:null==S?void 0:S.footerStat}))}),t(x,{children:t(g,{})})]})):null]})};export{S as TestimonialCard};
|