mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
test(button): add block button icon e2e
This commit is contained in:
@ -20,11 +20,7 @@ export class Button {
|
||||
let element = elementRef.nativeElement;
|
||||
|
||||
if (config.get('hoverCSS') === false) {
|
||||
element.classList.add('disable-hover');
|
||||
}
|
||||
|
||||
if (type) {
|
||||
renderer.setElementAttribute(elementRef, type, '');
|
||||
renderer.setElementClass(elementRef, 'disable-hover', true);
|
||||
}
|
||||
|
||||
if (element.hasAttribute('ion-item')) {
|
||||
@ -32,6 +28,10 @@ export class Button {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type) {
|
||||
renderer.setElementAttribute(elementRef, type, '');
|
||||
}
|
||||
|
||||
// figure out if and where the icon lives in the button
|
||||
let childNodes = element.childNodes;
|
||||
let childNode;
|
||||
|
@ -10,6 +10,11 @@
|
||||
<button block>button[block]</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a button block href="#"><icon help-circle></icon> a[button][block] icon</a>
|
||||
<button block><icon help-circle></icon> button[block] icon</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a button block outline secondary href="#">a[button][block][outline][secondary]</a>
|
||||
<button block outline secondary>button[block][outline][secondary]</button>
|
||||
|
Reference in New Issue
Block a user