diff --git a/src/components/category/category.tsx b/src/components/category/category.tsx index 1542e2e..09407e1 100644 --- a/src/components/category/category.tsx +++ b/src/components/category/category.tsx @@ -9,7 +9,7 @@ interface CategoryProps { sounds: Array<{ label: string; src: string; icon: React.ReactNode }>; } -export function Category({ icon, sounds, title }: CategoryProps) { +export function Category({ icon, id, sounds, title }: CategoryProps) { return (
@@ -19,7 +19,7 @@ export function Category({ icon, sounds, title }: CategoryProps) {

{title}

- +
); } diff --git a/src/components/sound/sound.module.css b/src/components/sound/sound.module.css index 0bbbf0c..9bdc89a 100644 --- a/src/components/sound/sound.module.css +++ b/src/components/sound/sound.module.css @@ -10,6 +10,10 @@ background: linear-gradient(var(--color-neutral-100), transparent); text-align: center; + &.hidden { + display: none; + } + &:not(.selected)::before { position: absolute; top: -1px; diff --git a/src/components/sound/sound.tsx b/src/components/sound/sound.tsx index f751832..fd582dc 100644 --- a/src/components/sound/sound.tsx +++ b/src/components/sound/sound.tsx @@ -11,9 +11,10 @@ interface SoundProps { label: string; src: string; icon: React.ReactNode; + hidden: boolean; } -export function Sound({ icon, label, src }: SoundProps) { +export function Sound({ hidden, icon, label, src }: SoundProps) { const { isPlaying, play } = usePlay(); const [isSelected, setIsSelected] = useLocalStorage( `${label}-is-selected`, @@ -49,7 +50,11 @@ export function Sound({ icon, label, src }: SoundProps) { return (