File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @patternfly/elements " : minor
3+ ---
4+
5+ ` <pf-button> ` : expose ` button ` part for styling the internal button element
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import styles from './BaseButton.css';
99
1010/**
1111 * Base button class
12- *
12+ * @csspart button - Internal button element
1313 * @csspart icon - Container for the icon slot
1414 * @slot icon
1515 * Contains the button's icon or state indicator, e.g. a spinner.
@@ -57,10 +57,11 @@ export abstract class BaseButton extends LitElement {
5757 override render ( ) {
5858 const { hasIcon } = this ;
5959 return html `
60- < button type ="${ ifDefined ( this . type ) } "
60+ < button aria-label ="${ ifDefined ( this . label ) } "
6161 class ="${ classMap ( { hasIcon } ) } "
62+ part ="button "
63+ type ="${ ifDefined ( this . type ) } "
6264 value ="${ ifDefined ( this . value ) } "
63- aria-label ="${ ifDefined ( this . label ) } "
6465 @click ="${ this . #onClick} "
6566 ?disabled ="${ this . disabled || this . #internals. formDisabled } ">
6667 < slot id ="icon " part ="icon " aria-hidden ="true " name ="icon "> ${ this . renderDefaultIcon ( ) } </ slot >
You can’t perform that action at this time.
0 commit comments