feat: add scrollbar-hide utility for spell tabs horizontal scroll

- Add scrollbar-hide utility class in index.css
- Hide scrollbars on TabsList for profile, event, and relay viewers
- Maintains horizontal scroll functionality without visible scrollbar
- Works across all browsers (Chrome, Firefox, Safari, IE/Edge)
This commit is contained in:
Claude
2026-01-22 15:25:57 +00:00
parent 594e2ee937
commit d4fe884848
4 changed files with 15 additions and 3 deletions

View File

@@ -386,7 +386,7 @@ export function EventDetailViewer({ pointer }: EventDetailViewerProps) {
defaultValue={eventSpells[0]?.id}
className="flex flex-col h-full"
>
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0 h-auto flex-shrink-0 overflow-x-auto overflow-y-hidden">
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0 h-auto flex-shrink-0 overflow-x-auto overflow-y-hidden scrollbar-hide">
{eventSpells.map((spell) => {
// Extract kinds from spell for display
const spellKinds = (() => {

View File

@@ -714,7 +714,7 @@ export function ProfileViewer({ pubkey }: ProfileViewerProps) {
defaultValue={pubkeySpells[0]?.id}
className="flex flex-col h-full"
>
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0 h-auto flex-shrink-0 overflow-x-auto overflow-y-hidden">
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0 h-auto flex-shrink-0 overflow-x-auto overflow-y-hidden scrollbar-hide">
{pubkeySpells.map((spell) => {
// Extract kinds from spell for display
const spellKinds = (() => {

View File

@@ -315,7 +315,7 @@ export function RelayViewer({ url }: RelayViewerProps) {
defaultValue={relaySpells[0]?.id}
className="flex flex-col h-full"
>
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0 h-auto flex-shrink-0 overflow-x-auto overflow-y-hidden">
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0 h-auto flex-shrink-0 overflow-x-auto overflow-y-hidden scrollbar-hide">
{relaySpells.map((spell) => {
// Extract kinds from spell for display
const spellKinds = (() => {

View File

@@ -5,6 +5,18 @@
@tailwind components;
@tailwind utilities;
@layer utilities {
/* Hide scrollbar while maintaining scroll functionality */
.scrollbar-hide {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera */
}
}
/* Custom scrollbar styling - uses theme variables */
* {
scrollbar-width: thin;