Skip to content

Commit

Permalink
AG-1703: move global popover styles into preset or colocate with targ…
Browse files Browse the repository at this point in the history
…eted component
  • Loading branch information
hallieswan authored and EC2 Default User committed Mar 7, 2025
1 parent f733202 commit 7fe1728
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions apps/agora/app/src/app/myPrimeNGPreset.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ApplicationConfig } from '@angular/core';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { providePrimeNG } from 'primeng/config';
import Lara from '@primeng/themes/lara';
import { definePreset } from '@primeng/themes';
import Lara from '@primeng/themes/lara';
import { providePrimeNG } from 'primeng/config';

export const MyPreset = definePreset(Lara, {
primitive: {
Expand Down Expand Up @@ -3757,7 +3757,7 @@ export const MyPreset = definePreset(Lara, {
background: '{overlay.popover.background}',
borderColor: '{overlay.popover.border.color}',
color: '{overlay.popover.color}',
borderRadius: '{overlay.popover.border.radius}',
borderRadius: '0px',
shadow: '{overlay.popover.shadow}',
gutter: '10px',
arrowOffset: '1.25rem',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
}
</span>
</p-button>
<p-popover #popover styleClass="popover">
@if (wikiId && hasActived) {
<agora-wiki [ownerId]="ownerId" [wikiId]="wikiId"></agora-wiki>
}
<p-popover #popover>
<div class="popover-link-content">
@if (wikiId && hasActived) {
<agora-wiki [ownerId]="ownerId" [wikiId]="wikiId"></agora-wiki>
}
</div>
</p-popover>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ agora-popover-link,
display: inline-block;
}

.popover-link-content {
max-width: 425px;
padding: 20px;
background: #fff;
}

.popover-link-inner {
display: flex;
}
Expand Down
10 changes: 0 additions & 10 deletions libs/agora/styles/src/lib/components/_shame.scss
Original file line number Diff line number Diff line change
Expand Up @@ -298,16 +298,6 @@ p-inputswitch.ng-dirty.ng-invalid > .p-inputswitch {
border-color: #e24c4c;
}

.popover {
max-width: 425px;
background: #fff;
box-shadow: 0 0 10px 0 rgb(0 0 0 / 15%);

.p-popover-content {
padding: 40px;
}
}

/* Remove primeng popover arrow */
.p-popover::before,
.p-popover::after {
Expand Down

0 comments on commit 7fe1728

Please sign in to comment.