File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const EVENT_STOP = `stop${EVENT_KEY}`
2424const EVENT_CLICK_DATA_API = `click${ EVENT_KEY } ${ DATA_API_KEY } `
2525
2626const CLASS_NAME_IS_LOADING = 'is-loading'
27+ const CLASS_NAME_LOADING_BUTTON = 'btn-loading'
2728const CLASS_NAME_LOADING_BUTTON_SPINNER = 'btn-loading-spinner'
2829
2930const SELECTOR_DATA_TOGGLE = '[data-coreui-toggle="loading-button"]'
@@ -58,6 +59,8 @@ class LoadingButton extends BaseComponent {
5859 if ( this . _element ) {
5960 Data . set ( element , DATA_KEY , this )
6061 }
62+
63+ this . _createButton ( )
6164 }
6265
6366 // Getters
@@ -124,6 +127,10 @@ class LoadingButton extends BaseComponent {
124127 this . _element = null
125128 }
126129
130+ _createButton ( ) {
131+ this . _element . classList . add ( CLASS_NAME_LOADING_BUTTON )
132+ }
133+
127134 _createSpinner ( ) {
128135 if ( this . _config . spinner ) {
129136 const spinner = document . createElement ( 'span' )
You can’t perform that action at this time.
0 commit comments