genBannerConfig({message, intent, iconName, enableClose}) {
        const icon = iconName ? Icon.icon({iconName, size: 'lg'}) : null,
            msgLines = compact(map(message.split('\n'), trim)),
            showFullAlert = () => XH.alert({
                title: 'Alert',
                icon,
                message: div(msgLines.map(it => p(it)))
            });

        let actionButtonProps, onClick;
        if (msgLines.length > 1) {
            actionButtonProps = {
                text: XH.isMobileApp ? 'More' : 'Read more...',
                onClick: showFullAlert
            };
        } else if (XH.isMobileApp) {
            onClick = showFullAlert;
        }

        return {
            message: msgLines[0],
            category: 'xhAlertBanner',
            intent,
            icon,
            enableClose,
            actionButtonProps,
            onClick
        };
    }
/** Called from admin {@see AlertBannerModel} to support preview. */
Called from admin  AlertBannerModel to support preview.
Called from admin AlertBannerModel to support preview .
genBannerConfig({message, intent, iconName, enableClose}) {
        const icon = iconName ? Icon.icon({iconName, size: 'lg'}) : null,
            msgLines = compact(map(message.split('\n'), trim)),
            showFullAlert = () => XH.alert({
                title: 'Alert',
                icon,
                message: div(msgLines.map(it => p(it)))
            });
        let actionButtonProps, onClick;
        if (msgLines.length > 1) {
            actionButtonProps = {
                text: XH.isMobileApp ? 'More' : 'Read more...',
                onClick: showFullAlert
            };
        } else if (XH.isMobileApp) {
            onClick = showFullAlert;
        }
        return {
            message: msgLines[0],
            category: 'xhAlertBanner',
            intent,
            icon,
            enableClose,
            actionButtonProps,
            onClick
        };
    }
genBannerConfig ( { message , intent , iconName , enableClose } ) { const icon = iconName ? Icon . icon ( { iconName , size : 'lg' } ) : null , msgLines = compact ( map ( message . split ( '\n' ) , trim ) ) , showFullAlert = ( ) => XH . alert ( { title : 'Alert' , icon , message : div ( msgLines . map ( it => p ( it ) ) ) } ) ; let actionButtonProps , onClick ; if ( msgLines . length > 1 ) { actionButtonProps = { text : XH . isMobileApp ? 'More' : 'Read more...' , onClick : showFullAlert } ; } else if ( XH . isMobileApp ) { onClick = showFullAlert ; } return { message : msgLines [ 0 ] , category : 'xhAlertBanner' , intent , icon , enableClose , actionButtonProps , onClick } ; }
Called from admin {@see AlertBannerModel} to support preview.
Called from admin { @see AlertBannerModel } to support preview .