feat: add MdTextButton to View APIs (#15328)
* view: make button focusable by default * view: add MdTextButton * view: add common methods to LabelButton
This commit is contained in:
parent
43a8b6039e
commit
260778e0fb
10 changed files with 157 additions and 2 deletions
|
@ -41,6 +41,7 @@ if (features.isViewApiEnabled()) {
|
|||
{ name: 'Button', file: 'views/button' },
|
||||
{ name: 'LabelButton', file: 'views/label-button' },
|
||||
{ name: 'LayoutManager', file: 'views/layout-manager' },
|
||||
{ name: 'MdTextButton', file: 'views/md-text-button' },
|
||||
{ name: 'TextField', file: 'views/text-field' }
|
||||
)
|
||||
}
|
||||
|
|
15
lib/browser/api/views/md-text-button.js
Normal file
15
lib/browser/api/views/md-text-button.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict'
|
||||
|
||||
const electron = require('electron')
|
||||
|
||||
const { LabelButton } = electron
|
||||
const { MdTextButton } = process.atomBinding('md_text_button')
|
||||
|
||||
Object.setPrototypeOf(MdTextButton.prototype, LabelButton.prototype)
|
||||
|
||||
MdTextButton.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
LabelButton.prototype._init.call(this)
|
||||
}
|
||||
|
||||
module.exports = MdTextButton
|
Loading…
Add table
Add a link
Reference in a new issue