Wajahat698 commited on
Commit
eedaf1f
·
verified ·
1 Parent(s): e2b26fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -3
app.py CHANGED
@@ -2460,15 +2460,48 @@ function refresh() {
2460
  url.searchParams.set('__theme', 'light');
2461
  window.location.href = url.href;
2462
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2463
  }
2464
  """
2465
  css = """
2466
- #vw_customers_btn {
2467
- color: teal;
2468
  border: 2px solid gray;
2469
- padding: 10px 20px;
 
 
 
 
 
 
 
 
2470
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
2471
  }
 
 
 
 
 
 
 
 
 
 
 
 
2472
  .gr-button:has(svg) {
2473
  display: none !important;
2474
  }
 
2460
  url.searchParams.set('__theme', 'light');
2461
  window.location.href = url.href;
2462
  }
2463
+ const btn1 = document.querySelector("#vw_customers_btn");
2464
+ const btn2 = document.querySelector("#vw_prospects_btn");
2465
+
2466
+ if (btn1 && btn2) {
2467
+ btn1.addEventListener("click", () => {
2468
+ btn1.classList.add("active-btn");
2469
+ btn2.classList.remove("active-btn");
2470
+ });
2471
+
2472
+ btn2.addEventListener("click", () => {
2473
+ btn2.classList.add("active-btn");
2474
+ btn1.classList.remove("active-btn");
2475
+ });
2476
+ }
2477
  }
2478
  """
2479
  css = """
2480
+ #vw_customers_btn, #vw_prospects_btn {
 
2481
  border: 2px solid gray;
2482
+ padding: 10px 24px;
2483
+ font-size: 16px;
2484
+ font-weight: 500;
2485
+ line-height: 1.2;
2486
+ text-align: center;
2487
+ border-radius: 6px;
2488
+ margin: 0 5px;
2489
+ background-color: white;
2490
+ color: #333;
2491
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
2492
  }
2493
+
2494
+ /* Active button class */
2495
+ .active-btn {
2496
+ background-color: #007bff !important;
2497
+ color: white !important;
2498
+ border-color: #007bff !important;
2499
+ }
2500
+
2501
+ /* Optional hover */
2502
+ #vw_customers_btn:hover, #vw_prospects_btn:hover {
2503
+ background-color: #f0f0f0;
2504
+ }
2505
  .gr-button:has(svg) {
2506
  display: none !important;
2507
  }