{iconName && }
{React.Children.map(children, (child, i) => {
if (typeof child !== 'object' || child == null || !('props' in child)) {
return child;
}
// convention here: first item is the main title, while others subtext
const className = classNames(
child.props.className,
{ 'd-none d-md-block': i } // subtext is anything but first element
);
const props = {
className
};
return React.cloneElement(child, props);
})}