Extending Dialog Buttons Option

Extending Dialog Buttons Option

Has there been any thought to developing Dialog Buttons - Primary, Secondary, Disabled?

I did not find a use for setting the priority of a button, the proposed implementation below was created to apply additional styles.

Thoughts?


Current

  1. buttons : {
  2.       "publish" : function() {  },
  3.       "preview" : function() {  }
  4.       "cancel" : function() {  }
  5. }

Proposed

  1. buttons : {
  2.       "publish" : function() { //support current functionality },
  3.       "preview" : {
  4.             click : function() {  }
  5.             // enabled defaults to true
  6.       },
  7.       "cancel" : {
  8.             click : function() {  },
  9.             enabled : false
  10.       },
  11. }