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