Button Icon #508

Open
mehmetalidumlu opened this Issue Apr 16, 2016 · 5 comments

Projects

None yet

3 participants

@mehmetalidumlu

Hi,
Can we put span before button text?

Standart Button: <button data-bb-handler="success" type="button" class="btn btn-success">Save</button>

With Span: <button data-bb-handler="success" type="button" class="btn btn-success"><span class="my_class_name"></span>Save</button>

@tiesont
Collaborator
tiesont commented Apr 19, 2016

Yes.

@tiesont
Collaborator
tiesont commented Apr 19, 2016

Here's an example of a confirm with icons:

  bootbox.confirm({
    title: "Your Title",
    message: "Does this make sense?",
    buttons: {
      cancel: {
        label: '<i class="fa fa-times"></i> Cancel'
      },
      confirm: {
        label: '<i class="fa fa-check"></i> Confirm'
      }
    },
    callback: function(result) {
      /* your callback code */
    }
  });
@mehmetalidumlu

Thanks, I had hoped it has icon parameter. I put icon class with another way.
As fallows...

bootbox.confirm({
    title: "Your Title",
    message: "Does this make sense?",
    buttons: {
      cancel: {
        label: 'Cancel'
        icon: 'fa fa-times'
      },
      confirm: {
        label: 'Confirm',
        icon: 'fa fa-check'
      }
    },
    callback: function(result) {
      /* your callback code */
    }
  });
@tarlepp
Collaborator
tarlepp commented Apr 27, 2016

Icon support sounds like a good idea... but it should also support other icon libraries than font-awesome, eg. mdi and what about svg icons + tons of more similar libraries?

Could you make a PR about this feature request?

@tiesont tiesont added the Request label Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment