Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implementation(PrimeNG-17): #29662 Fix Outline SplitButton issues #29686

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 43 additions & 24 deletions core-web/apps/dotcms-ui/src/stories/primeng/button/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,145 +848,164 @@ export const BasicSplitButtonTemplate = `<div style="display: flex; gap: 24px; f

export const OutlinedSplitButtonTemplate = `<div style="display: flex; gap: 24px; flex-direction: column; align-items: center">
<div style="display: flex; gap: 8px; justify-content: center; width: fit-content">
<p-splitButton label="Save" [model]="items" styleClass="p-button-lg p-button-outlined"></p-splitButton>
<p-splitButton label="Save" [model]="items" styleClass="p-button-lg" outlined></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
[model]="items"
styleClass="p-button-lg p-button-outlined"
styleClass="p-button-lg"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
iconPos="right"
[model]="items"
styleClass="p-button-lg p-button-outlined"
styleClass="p-button-lg"
outlined
></p-splitButton>
<p-splitButton
label="Disabled"
disabled="true"
styleClass="p-button-lg p-button-outlined"
styleClass="p-button-lg"
outlined
></p-splitButton>
</div>
<div style="display: flex; gap: 8px; justify-content: center; width: fit-content">
<p-splitButton label="Save" [model]="items" styleClass="p-button-outlined"></p-splitButton>
<p-splitButton label="Save" [model]="items" outlined></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
[model]="items"
styleClass="p-button-outlined"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
iconPos="right"
[model]="items"
styleClass="p-button-outlined"
outlined
></p-splitButton>
<p-splitButton
label="Disabled"
disabled="true"
styleClass="p-button-outlined"
outlined
></p-splitButton>
</div>
<div style="display: flex; gap: 8px; justify-content: center; width: fit-content">
<p-splitButton
label="Save"
[model]="items"
styleClass="p-button-sm p-button-outlined"
styleClass="p-button-sm"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
[model]="items"
styleClass="p-button-sm p-button-outlined"
styleClass="p-button-sm"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
iconPos="right"
[model]="items"
styleClass="p-button-sm p-button-outlined"
styleClass="p-button-sm"
outlined
></p-splitButton>
<p-splitButton
label="Disabled"
disabled="true"
styleClass="p-button-sm p-button-outlined"
styleClass="p-button-sm"
outlined
></p-splitButton>
</div>
<div style="display: flex; gap: 8px; justify-content: center; width: fit-content">
<p-splitButton
label="Save"
[model]="items"
styleClass="p-button-lg p-button-secondary p-button-outlined"
styleClass="p-button-lg p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
[model]="items"
styleClass="p-button-lg p-button-secondary p-button-outlined"
styleClass="p-button-lg p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
iconPos="right"
[model]="items"
styleClass="p-button-lg p-button-secondary p-button-outlined"
styleClass="p-button-lg p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Disabled"
disabled="true"
styleClass="p-button-lg p-button-secondary p-button-outlined"
styleClass="p-button-lg p-button-secondary"
outlined
></p-splitButton>
</div>
<div style="display: flex; gap: 8px; justify-content: center; width: fit-content">
<p-splitButton
label="Save"
[model]="items"
styleClass="p-button-secondary p-button-outlined"
styleClass="p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
[model]="items"
styleClass="p-button-secondary p-button-outlined"
styleClass="p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
iconPos="right"
[model]="items"
styleClass="p-button-secondary p-button-outlined"
styleClass="p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Disabled"
disabled="true"
styleClass="p-button-secondary p-button-outlined"
styleClass="p-button-secondary"
outlined
></p-splitButton>
</div>
<div style="display: flex; gap: 8px; justify-content: center; width: fit-content">
<p-splitButton
label="Save"
[model]="items"
styleClass="p-button-sm p-button-secondary p-button-outlined"
styleClass="p-button-sm p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
[model]="items"
styleClass="p-button-sm p-button-secondary p-button-outlined"
styleClass="p-button-sm p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Save"
icon="pi pi-save"
iconPos="right"
[model]="items"
styleClass="p-button-sm p-button-secondary p-button-outlined"
styleClass="p-button-sm p-button-secondary"
outlined
></p-splitButton>
<p-splitButton
label="Disabled"
disabled="true"
styleClass="p-button-sm p-button-secondary p-button-outlined"
styleClass="p-button-sm p-button-secondary"
outlined
></p-splitButton>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
.p-splitbutton-defaultbutton:enabled,
.p-splitbutton-menubutton:enabled {
@extend #outlined-primary-severity;
color: $color-palette-primary;
}

&.p-button-sm {
Expand All @@ -84,6 +85,7 @@
.p-splitbutton-defaultbutton:enabled,
.p-splitbutton-menubutton:enabled {
@extend #outlined-secondary-severity;
color: $color-palette-secondary;
}

&.p-button-sm {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<p-splitButton
(onClick)="action[0].command()"
[disabled]="loading"
[styleClass]="sizeClass + (!first ? ' p-button-outlined' : '')"
[styleClass]="sizeClass"
[model]="action | slice: 1"
[outlined]="!first"
[label]="action[0].label" />
} @else {
<p-button
Expand Down
Loading