| 
 | 1 | +import Logo from '../../../message/logos';  | 
 | 2 | +import { textWrap, messageLogoWidth, altNoWrap, setLogoTop } from '../../../message/mediaQueries';  | 
 | 3 | +import { flexLogoMutations, textLogoMutations } from '../../../message/logoMutations';  | 
 | 4 | + | 
 | 5 | +const flex = [  | 
 | 6 | +    [  | 
 | 7 | +        'default',  | 
 | 8 | +        {  | 
 | 9 | +            logo: Logo.PP_PAYPAL.WHITE,  | 
 | 10 | +            headline: [  | 
 | 11 | +                {  | 
 | 12 | +                    tag: 'xsmall'  | 
 | 13 | +                }  | 
 | 14 | +            ],  | 
 | 15 | +            disclaimer: ['default']  | 
 | 16 | +        }  | 
 | 17 | +    ],  | 
 | 18 | +    [  | 
 | 19 | +        'ratio:20x1',  | 
 | 20 | +        {  | 
 | 21 | +            styles: [  | 
 | 22 | +                `  | 
 | 23 | +                @media (min-aspect-ratio: 200/11) and (min-width: 523px) {  | 
 | 24 | +                    .message__logo-container {  | 
 | 25 | +                        max-width: 12%;  | 
 | 26 | +                    }  | 
 | 27 | +                }  | 
 | 28 | +
  | 
 | 29 | +                @media (min-aspect-ratio: 200/11) and (min-width: 300px) {  | 
 | 30 | +                    .message__logo:nth-of-type(1) {  | 
 | 31 | +                        width: 18%;  | 
 | 32 | +                    }  | 
 | 33 | +                    .message__logo:nth-of-type(2) {  | 
 | 34 | +                        width: 60%;  | 
 | 35 | +                    }  | 
 | 36 | +                }  | 
 | 37 | +
  | 
 | 38 | +                @media (min-aspect-ratio: 60/11) and (min-width: 324px) {  | 
 | 39 | +                    .message__headline .tag--xsmall .br:first-child {  | 
 | 40 | +                        display: inline;  | 
 | 41 | +                    }  | 
 | 42 | +                }  | 
 | 43 | +                `  | 
 | 44 | +            ]  | 
 | 45 | +        }  | 
 | 46 | +    ],  | 
 | 47 | +    [  | 
 | 48 | +        'ratio:8x1',  | 
 | 49 | +        {  | 
 | 50 | +            headline: [  | 
 | 51 | +                {  | 
 | 52 | +                    tag: 'xsmall'  | 
 | 53 | +                }  | 
 | 54 | +            ],  | 
 | 55 | +            styles: [  | 
 | 56 | +                `@media (min-aspect-ratio: 60/11) and (min-width: 324px) {  | 
 | 57 | +                    .message__headline .tag--xsmall .br:first-child {  | 
 | 58 | +                        display: inline;  | 
 | 59 | +                    }  | 
 | 60 | +                }  | 
 | 61 | +                `  | 
 | 62 | +            ]  | 
 | 63 | +        }  | 
 | 64 | +    ],  | 
 | 65 | +    [  | 
 | 66 | +        'ratio:1x4',  | 
 | 67 | +        {  | 
 | 68 | +            headline: [  | 
 | 69 | +                {  | 
 | 70 | +                    tag: 'xsmall'  | 
 | 71 | +                }  | 
 | 72 | +            ],  | 
 | 73 | +            styles: [  | 
 | 74 | +                `.message__headline .tag--xsmall {  | 
 | 75 | +    display: inline;  | 
 | 76 | +}`  | 
 | 77 | +            ]  | 
 | 78 | +        }  | 
 | 79 | +    ],  | 
 | 80 | +    ['color:white-no-border', { logo: Logo.PP_PAYPAL.COLOR }],  | 
 | 81 | +    ...flexLogoMutations  | 
 | 82 | +];  | 
 | 83 | + | 
 | 84 | +export default {  | 
 | 85 | +    'layout:flex': flex,  | 
 | 86 | +    'layout:text': [  | 
 | 87 | +        [  | 
 | 88 | +            'default',  | 
 | 89 | +            ({ textSize }) => ({  | 
 | 90 | +                styles: [  | 
 | 91 | +                    textWrap(textSize * 38, textSize, 'US'),  | 
 | 92 | +                    messageLogoWidth(false, textSize * 4, textSize * 1.25),  | 
 | 93 | +                    setLogoTop(textSize * 20)  | 
 | 94 | +                ],  | 
 | 95 | +                logo: Logo.PP_PAYPAL.COLOR,  | 
 | 96 | +                headline: [{ tag: 'xsmall' }],  | 
 | 97 | +                disclaimer: ['default']  | 
 | 98 | +            })  | 
 | 99 | +        ],  | 
 | 100 | +        [  | 
 | 101 | +            'logo.type:primary && logo.position:right',  | 
 | 102 | +            ({ textSize }) => ({  | 
 | 103 | +                styles: [setLogoTop(textSize * 22), messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)]  | 
 | 104 | +            })  | 
 | 105 | +        ],  | 
 | 106 | +        [  | 
 | 107 | +            'logo.type:primary && logo.position:top',  | 
 | 108 | +            ({ textSize }) => ({  | 
 | 109 | +                styles: [messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)]  | 
 | 110 | +            })  | 
 | 111 | +        ],  | 
 | 112 | +        [  | 
 | 113 | +            'logo.type:alternative',  | 
 | 114 | +            ({ textSize }) => ({  | 
 | 115 | +                styles: [  | 
 | 116 | +                    `@media screen and (max-width: ${textSize * 10.5}px) { .message__content { white-space: nowrap; }}`,  | 
 | 117 | +                    textWrap(textSize * 32, textSize, 'US'),  | 
 | 118 | +                    altNoWrap(textSize * 10.6),  | 
 | 119 | +                    messageLogoWidth(textSize * 1.75, textSize * 4, textSize * 1.25)  | 
 | 120 | +                ],  | 
 | 121 | +                logo: Logo.PP_PAYPAL.COLOR[0]  | 
 | 122 | +            })  | 
 | 123 | +        ],  | 
 | 124 | +        [  | 
 | 125 | +            'logo.type:none',  | 
 | 126 | +            ({ textSize }) => ({  | 
 | 127 | +                styles: [`@media screen and (max-width: ${textSize * 37.3}) {.message__content {margin-top: 0px;}}`],  | 
 | 128 | +                logo: false,  | 
 | 129 | +                headline: [  | 
 | 130 | +                    {  | 
 | 131 | +                        tag: 'xsmall.2',  | 
 | 132 | +                        br: ['later.', 'tard.'],  | 
 | 133 | +                        replace: [  | 
 | 134 | +                            ['later.', 'later'],  | 
 | 135 | +                            ['tard.', 'tard']  | 
 | 136 | +                        ]  | 
 | 137 | +                    }  | 
 | 138 | +                ]  | 
 | 139 | +            })  | 
 | 140 | +        ],  | 
 | 141 | +        [  | 
 | 142 | +            'logo.type:inline',  | 
 | 143 | +            ({ textSize }) => ({  | 
 | 144 | +                styles: [`.message__logo { width: ${textSize * 4}px }`],  | 
 | 145 | +                logo: Logo.NO_PP_MONOGRAM.COLOR,  | 
 | 146 | +                headline: [  | 
 | 147 | +                    {  | 
 | 148 | +                        tag: 'xsmall.2',  | 
 | 149 | +                        br: ['later.', 'tard.'],  | 
 | 150 | +                        replace: [  | 
 | 151 | +                            ['later.', 'later'],  | 
 | 152 | +                            ['tard.', 'tard']  | 
 | 153 | +                        ]  | 
 | 154 | +                    }  | 
 | 155 | +                ]  | 
 | 156 | +            })  | 
 | 157 | +        ],  | 
 | 158 | +        ...textLogoMutations  | 
 | 159 | +    ]  | 
 | 160 | +};  | 
0 commit comments