import { Rock } from "@ruiapp/move-style"; import { renderRock, renderRockChildren } from "@ruiapp/react-renderer"; import { RapidPageSectionRockConfig } from "./rapid-page-section-types"; import RapidPageSectionMeta from "./RapidPageSectionMeta"; import "./RapidPageSection.css"; export default { $type: "rapidPageSection", Renderer(context: any, props: RapidPageSectionRockConfig) { const { scope } = context; const { title, style, actions } = props; return (
{title && (

{title}

{actions && actions.length > 0 && (
{actions.map((action: any, index: number) => renderRock({ context, rockConfig: action }))}
)}
)}
{renderRockChildren({ context, rockChildrenConfig: props.children, })}
); }, ...RapidPageSectionMeta, } as Rock;