mathieudutour / Meteor-popup-confirm

11 stars 9 forks source link

Display icon in title #10

Open prachi708 opened 7 years ago

prachi708 commented 7 years ago

'click #B1':function(e){ $('#fileSpan').text(''); new Confirmation({ message: "..........", title: "Information", cancelText: "Add", okText: "Skip", success: true, // whether the button should be green or red focus: "cancel" // which button to autofocus, "cancel" (default) or "ok", or "none" }, function (ok) { console.log('ok ',ok) if(ok){ } }); },

this is the code i am using to display my alert box. It is working fine. i want to display icon "i" from font-awesome with title "information". How can I do this?

mathieudutour commented 7 years ago

I'm guessing you can change the template to use triple {} for the title so that you can pass an html string.

I haven't work with meteor for years so I won't work on that but happy to accept a PR

Astrea123 commented 7 years ago

Your solution is not clear to me

I want my alert box to look like this. image

this is what I have achieved image

I want icon 'i' before text Information. How I can add it?

mathieudutour commented 7 years ago

Like I said, you would need to fork this repo and change the template to use {{{title}}} instead of {{title}}. Then you will be able to do

new Confirmation({
  title: '<i class="icon" /> Information'
})