import type { PropsWithChildren, ReactElement } from 'react'; import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps'; import './NarrowWide.css'; interface NarrowWideProps extends PConnProps { // If any, enter additional props that only exist on this component a: any; b: any; title?: string; cols?: string; icon?: string; } export default function NarrowWide(props: PropsWithChildren) { // const {a, b /*, cols, icon, title */ } = props; const { a, b, children } = props; return ( <> {children && (children as ReactElement[]).length === 2 && (
{children[0]}
{children[1]}
)} {a && b && (
{a}
{b}
)} ); }