mirror of https://github.com/artf/grapesjs.git
2 changed files with 10 additions and 6 deletions
@ -1,18 +1,18 @@ |
|||
import Component from './ComponentText'; |
|||
import { toLowerCase } from 'utils/mixins'; |
|||
|
|||
const type = 'label'; |
|||
|
|||
export default Component.extend( |
|||
{ |
|||
defaults: { |
|||
...Component.prototype.defaults, |
|||
tagName: 'label', |
|||
type, |
|||
tagName: type, |
|||
traits: ['id', 'title', 'for'] |
|||
} |
|||
}, |
|||
{ |
|||
isComponent(el) { |
|||
if (el.tagName == 'LABEL') { |
|||
return { type: 'label' }; |
|||
} |
|||
} |
|||
isComponent: el => toLowerCase(el.tagName) === type |
|||
} |
|||
); |
|||
|
|||
Loading…
Reference in new issue