Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- route
- 옵저버블
- 모달
- 앵귤러 애니메이션
- Oracle LISTAGG 사용 예시
- angular animation
- egov spring ajax 사용 예시
- prisma
- Ionic modal
- formgroup
- 아이오닉 스크롤 이벤트
- angular modal
- mysql if
- TAILWIND
- angular button
- 스크롤 이벤트 감지
- angular route
- flex-1
- 스크롤 이벤트
- scroll
- Router
- ajax 사용 예시
- 호버
- Angular Router
- 셀렉트박스 커스텀
- summary
- 앵귤러 모달
- 검색
- modal
- ApexChart
Archives
- Today
- Total
깜놀하는 해므찌로
CSS select box custom Primary feat.tailwind 본문
반응형
SMALL
<div class="flex items-center cursor-pointer" [ngClass]="class">
<div
class="flex w-full gap-2 border border-gray-200 rounded-md max-w-max shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)]"
(click)="isOpen = !isOpen"
>
<div class="flex-col relative">
<div
#box
class="flex w-full items-center justify-between gap-[0.6875rem] px-3 py-[10px]"
>
<div>10</div>
<div>
<app-icon
[ngClass]="{ 'rotate-180': isOpen }"
name="material-symbols:keyboard-arrow-up"
class="h-5 w-5 transition-all"
/>
</div>
</div>
<ng-container *ngIf="!isOpen">
<div
class="bg-white border w-full border-gray-200 rounded-md absolute flex flex-col z-10 left-0 bottom-12"
>
<div *ngFor="let item of pageAmount" class="p-2">
<div
(change)="handleAmount(item)"
class="flex w-full text-gray-600 hover:bg-primary hover:text-white items-center rounded-md px-3 py-2.5 justify-center"
>
{{ item }}
</div>
</div>
</div>
</ng-container>
</div>
</div>
</div>
1. isOpen: boolean 변수를 활용해서 여닫기
2. (click) 클릭 이벤트 발생 시 isOpen 변수에 !isOpen 할당
3. *ngIf = 조건 : true 시 자식 요소 로드
반응형
LIST
'IT' 카테고리의 다른 글
CSS tailwind basis 사용 예시 / flex-1 게시판 (0) | 2023.04.27 |
---|---|
C언어 기초 알고리즘 배열 내 가장 큰 수 찾기 예시 (0) | 2023.04.26 |
Angular component string to template HTML / 컴포넌트 string 템플릿에서 html로 읽는 방법 예시 (0) | 2023.04.26 |
tailwind 기본 설정 / tailwind is not working (0) | 2023.04.25 |
transition-all css / select custom / details div로 끝내기 (0) | 2023.04.25 |