Fix: Stündlich-Bereich im Wetter-Modal scrollbar machen
- shrink-0 statt min-w damit Flex-Items nicht zusammengedrückt werden - Scrollbar sichtbar (thin) mit accent-farbigem Styling - Fade-Gradient am rechten Rand als Scroll-Hinweis Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b4906b7a48
commit
e715197b7a
1 changed files with 32 additions and 28 deletions
|
|
@ -112,35 +112,39 @@ export default function WeatherDetailModal({ weather, hourly, onClose, accentCol
|
||||||
<span className="section-rule" />
|
<span className="section-rule" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div className="relative">
|
||||||
className="flex gap-0 overflow-x-auto border border-base-300"
|
<div
|
||||||
style={{ scrollbarWidth: "none" }}
|
className="flex gap-0 overflow-x-auto border border-base-300"
|
||||||
>
|
style={{ scrollbarWidth: "thin", scrollbarColor: `${accentColor === "gold" ? "#e8a44a" : accentColor === "mint" ? "#4ae8a8" : "#a87aec"}40 transparent` }}
|
||||||
{hourly.map((slot, i) => (
|
>
|
||||||
<div
|
{hourly.map((slot, i) => (
|
||||||
key={slot.time}
|
<div
|
||||||
className={`
|
key={slot.time}
|
||||||
flex flex-col items-center gap-1 min-w-[3.5rem] px-2 py-3
|
className={`
|
||||||
border-r border-base-300 last:border-r-0
|
flex flex-col items-center gap-1 shrink-0 w-[3.5rem] py-3
|
||||||
${i === 0 ? `${a.bg}/[0.06]` : "hover:bg-base-100"}
|
border-r border-base-300 last:border-r-0
|
||||||
`}
|
${i === 0 ? `${a.bg}/[0.06]` : "hover:bg-base-100"}
|
||||||
>
|
`}
|
||||||
<span className={`text-[9px] font-mono font-medium tracking-wider uppercase ${
|
>
|
||||||
i === 0 ? a.text : "text-base-500"
|
<span className={`text-[9px] font-mono font-medium tracking-wider uppercase ${
|
||||||
}`}>
|
i === 0 ? a.text : "text-base-500"
|
||||||
{i === 0 ? "Jetzt" : slot.time}
|
}`}>
|
||||||
</span>
|
{i === 0 ? "Jetzt" : slot.time}
|
||||||
<span className="text-lg select-none">{slot.icon}</span>
|
|
||||||
<span className={`text-xs data-value ${i === 0 ? `${a.text} ${a.glow}` : "text-base-900"}`}>
|
|
||||||
{Math.round(slot.temp)}°
|
|
||||||
</span>
|
|
||||||
{slot.precip_chance > 0 && (
|
|
||||||
<span className="text-[8px] font-mono text-azure/80">
|
|
||||||
{slot.precip_chance}%
|
|
||||||
</span>
|
</span>
|
||||||
)}
|
<span className="text-lg select-none">{slot.icon}</span>
|
||||||
</div>
|
<span className={`text-xs data-value ${i === 0 ? `${a.text} ${a.glow}` : "text-base-900"}`}>
|
||||||
))}
|
{Math.round(slot.temp)}°
|
||||||
|
</span>
|
||||||
|
{slot.precip_chance > 0 && (
|
||||||
|
<span className="text-[8px] font-mono text-azure/80">
|
||||||
|
{slot.precip_chance}%
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
{/* Scroll fade hint */}
|
||||||
|
<div className="pointer-events-none absolute top-0 right-0 bottom-0 w-8 bg-gradient-to-l from-base-50 to-transparent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue