Skip to content

Commit 6fa751a

Browse files
authored
Merge branch 'main' into fix/tabs/scroll-on-small-screen
2 parents 37c23c3 + 9266ee5 commit 6fa751a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.changeset/plenty-clouds-exist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@patternfly/elements": minor
3+
---
4+
5+
`<pf-button>`: expose `button` part for styling the internal button element

elements/pf-button/BaseButton.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)