Fix Popup Style
This commit is contained in:
1 parent
9e6a846bfa
commit
c3f24f5e6d
8 files changed
+31
-11
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<div class="popup-backdrop" [class.center]="isCenter" (click)="onClose()">
|
||||
<div class="popup-container"
|
||||
[class]="'variant-' + variant()"
|
||||
[class.custom-pos]="!isCenter"
|
||||
[style.top]="customStyle.top"
|
||||
[style.left]="customStyle.left"
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
}
|
||||
|
||||
.popup-container {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 0 40px oklch(0 0 0 / 15%);
|
||||
min-width: 40px;
|
||||
@@ -30,6 +29,16 @@
|
||||
border: oklch(0 0 0 / 20%) 2px solid;
|
||||
gap: 15px;
|
||||
|
||||
&.variant-glass {
|
||||
background-color: oklch(1 0 0 / 60%);
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
&.variant-solid {
|
||||
background-color: white;
|
||||
backdrop-filter: none;
|
||||
}
|
||||
|
||||
&.custom-pos {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ export type PopupPosition = {
|
||||
bottom?: string;
|
||||
};
|
||||
|
||||
export type PopupVariant = 'glass' | 'solid';
|
||||
|
||||
@Component({
|
||||
selector: 'app-popup',
|
||||
standalone: true,
|
||||
@@ -20,6 +22,11 @@ export class PopupComponent {
|
||||
*/
|
||||
position = input<PopupPosition | 'center'>('center');
|
||||
|
||||
/**
|
||||
* 팝업의 스타일 변형 (기본값은 'glass')
|
||||
*/
|
||||
variant = input<PopupVariant>('glass');
|
||||
|
||||
/**
|
||||
* 팝업 닫기 요청 (배경 클릭 또는 닫기 버튼)
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user