Solved

How do I include a blank line in a text or textblock component?

Schmidtc63
Shopify Partner
79 11 21

I need to include a blank line in some text. Of course br does not work as Shopify has seen fit to not allow this.

 

 

 

    const tooltip = root.createComponent(
        Tooltip,
        {},
        [
            root.createComponent(TextBlock, {}, `We've got you covered! By opting in to our package protection, you will be ensured that your package will arrive to you in excellent condition or your money back!     `),
            root.createComponent(TextBlock, {}, ` `),
            root.createComponent(TextBlock, {}, ` `),
            root.createComponent(TextBlock, {}, `KicKee's package protection covers lost,stolen or damaged packages.`),
            link2
        ]
    );

 

 
What this renders is no blank line.
 
This renders separate lines but I don't want to see the "-----":

 

    const tooltip = root.createComponent(
        Tooltip,
        {},
        [
            root.createComponent(TextBlock, {}, `We've got you covered! By opting in to our package protection, you will be ensured that your package will arrive to you in excellent condition or your money back!     `),
            root.createComponent(TextBlock, {}, `-----`),
            root.createComponent(TextBlock, {}, `-----`),
            root.createComponent(TextBlock, {}, `KicKee's package protection covers lost,stolen or damaged packages.`),
            link2
        ]
    );

 

Accepted Solution (1)

Schmidtc63
Shopify Partner
79 11 21

This is an accepted solution.

root.createComponent(BlockSpacer, {spacing: 'loose'}),

View solution in original post

Reply 1 (1)

Schmidtc63
Shopify Partner
79 11 21

This is an accepted solution.

root.createComponent(BlockSpacer, {spacing: 'loose'}),