DEV Community

Kevin Jump
Kevin Jump

Posted on

1 1 1

Umbraco Early Adopter Gotcha - Empty Buttons.

Things, i keep getting wrong. Part c of n

When you define a button in the new ui.

 <uui-button color="danger" look="primary"
 label="Confirm?" @click=${this.openConfirm}></uui-button>
Enter fullscreen mode Exit fullscreen mode

Confirm button

You might be tempted to make the code all neat.

<uui-button 
   color="danger" 
   look="primary"
   label="Confirm?" @click=${this.openConfirm}>
</uui-button>
Enter fullscreen mode Exit fullscreen mode

but beware !

That last carrage return has made the button empty !! and if won't render any text !

Empty Button!

Empty Button? check the carrage return!

Don't get stuck wasting time (like me). put the closing tag at the end of the line.

<uui-button 
   color="danger" 
   look="primary"
   label="Confirm?" @click=${this.openConfirm}></uui-button>
Enter fullscreen mode Exit fullscreen mode

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay