Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

Closable message with icons?

Open dsignr opened this issue 12 years ago • 3 comments

Hi, I love the message module from SUI, only thing I'm missing as of now is a button to close Iconated messages.

<div class="ui icon error message">
  <i class="attention circle icon"></i>
  <div class="content">
    <div class="header">Negative Message</div>
    <p>Example description</p>
  </div>
</div>

Which outputs something like this: screen shot 2014-10-10 at 1 01 24 pm

But it would be really awesome and useful if there was a provision to accommodate a close button as well, into the same message, so the entire thing looks like this:

screen shot 2014-10-10 at 1 01 24 pm

I really miss this feature because messages are used extensively inside our product - Notices, infos, user-boarding, feedback, etc.

At present, I'm just using a simple JQuery script to dismiss the message on click. But a close button would be really cool (and functional too!). Just a thought, cheers :)

Thanks, Jack for all your hardwork!

dsignr avatar Oct 10 '14 07:10 dsignr

Have you seen dismissable messages ? It's pretty much what you want.

Adding a <i class="close icon"></i> in the message you want will have this results. It also works in icon messages. You will need to handle the JS click event on your own.

Note: the link is to the beta site, but this feature also exists on the release version.

anestv avatar Oct 10 '14 12:10 anestv

Jsfiddle example of both used together

jlukic avatar Oct 10 '14 13:10 jlukic

Strange, it didn't work when I tried it, but nevertheless thanks @anestv and @jlukic !

dsignr avatar Oct 10 '14 16:10 dsignr