Spaces:
Running
Running
| class CaseHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .case-header { | |
| background-color: white; | |
| border-radius: 0.5rem; | |
| padding: 2rem; | |
| box-shadow: 0 1px 3px rgba(0,0,0,0.1); | |
| border-left: 4px solid #4f46e5; | |
| } | |
| h1 { | |
| font-size: 1.5rem; | |
| font-weight: bold; | |
| color: #111827; | |
| margin-bottom: 0.5rem; | |
| } | |
| .case-meta { | |
| display: flex; | |
| gap: 2rem; | |
| margin-top: 1rem; | |
| flex-wrap: wrap; | |
| } | |
| .meta-item { | |
| display: flex; | |
| align-items: center; | |
| color: #6b7280; | |
| } | |
| .meta-item i { | |
| margin-right: 0.5rem; | |
| } | |
| .status-badge { | |
| background-color: #fef3c7; | |
| color: #92400e; | |
| padding: 0.25rem 0.75rem; | |
| border-radius: 9999px; | |
| font-size: 0.875rem; | |
| font-weight: 500; | |
| margin-left: auto; | |
| } | |
| @media (max-width: 768px) { | |
| .case-meta { | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .status-badge { | |
| margin-left: 0; | |
| } | |
| } | |
| </style> | |
| <div class="case-header"> | |
| <h1>${this.getAttribute('case-title') || 'Case Title'}</h1> | |
| <div class="case-meta"> | |
| <div class="meta-item"> | |
| <i data-feather="hash"></i> | |
| <span>${this.getAttribute('case-number') || 'No Case Number'}</span> | |
| </div> | |
| <div class="meta-item"> | |
| <i data-feather="calendar"></i> | |
| <span>Filed: Feb 15, 2024</span> | |
| </div> | |
| <div class="meta-item"> | |
| <i data-feather="user"></i> | |
| <span>Representative: Ali Habibpoor</span> | |
| </div> | |
| <div class="status-badge"> | |
| <i data-feather="clock"></i> | |
| Pending Appeal | |
| </div> | |
| </div> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('case-header', CaseHeader); |