mirror of https://github.com/artf/grapesjs.git
1 changed files with 6 additions and 3 deletions
@ -1,17 +1,20 @@ |
|||
import ComponentText from './ComponentText'; |
|||
import { toLowerCase } from 'utils/mixins'; |
|||
import { toLowerCase } from '../../utils/mixins'; |
|||
|
|||
const type = 'label'; |
|||
|
|||
export default class ComponentLabel extends ComponentText { |
|||
get defaults() { |
|||
return { |
|||
// @ts-ignore
|
|||
...super.defaults, |
|||
type, |
|||
tagName: type, |
|||
traits: ['id', 'title', 'for'], |
|||
}; |
|||
} |
|||
} |
|||
|
|||
ComponentLabel.isComponent = el => toLowerCase(el.tagName) === type; |
|||
static isComponent(el: HTMLElement) { |
|||
return toLowerCase(el.tagName) === type; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue