UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

2 lines (1 loc) 1.18 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/Card"),r=require("@mui/material/CardContent"),o=require("@mui/material/Stack"),n=require("./constant.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),s=a(r),u=a(o);exports.HeroBannerComponent=t=>{const{backgroundImage:r,backgroundColor:o,titleComponent:a,descriptionComponent:l,authorNameComponent:d,lastUpdatedComponent:m,actionComponent:c,sx:p,...x}=t,f=r&&"string"==typeof r;return e.jsx(i.default,{sx:[{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",backgroundImage:f?`url('${r}')`:"",backgroundColor:o,backgroundSize:"cover",minHeight:"390px",width:1,mx:"auto",borderRadius:2,color:o?e=>e.palette.getContrastText(o):"common.white",overflow:"hidden",px:{xs:5,sm:21},py:{xs:12,sm:10}},...Array.isArray(p)?p:[p]],className:`${n.prefix}-root`,"data-testid":`${n.prefix}-root`,...x,children:e.jsxs(s.default,{sx:{flexBasis:"100%",p:0},children:[a,l,c,(d||m)&&e.jsxs(u.default,{direction:"row",justifyContent:"flex-start",alignItems:"center",mt:5,children:[d," ",m]}),!f&&r]})})};