mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-30 15:24:08 +03:00
Extract static DATA_KEY & EVENT_KEY to base-component (#33635)
* Force each plugin that extends base-components to implement a static method `NAME()` * Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
This commit is contained in:
+3
-3
@@ -36,8 +36,8 @@ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
class Button extends BaseComponent {
|
||||
// Getters
|
||||
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY
|
||||
static get NAME() {
|
||||
return NAME
|
||||
}
|
||||
|
||||
// Public
|
||||
@@ -90,6 +90,6 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
|
||||
* add .Button to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
defineJQueryPlugin(NAME, Button)
|
||||
defineJQueryPlugin(Button)
|
||||
|
||||
export default Button
|
||||
|
||||
Reference in New Issue
Block a user