2025-03-30 16:42:51 -03:00
|
|
|
import React from 'react';
|
|
|
|
import { Playlist } from "../data/playlists"
|
|
|
|
|
|
|
|
interface SidebarProps {
|
|
|
|
playlists: Playlist[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export function Sidebar({ playlists }: SidebarProps) {
|
|
|
|
return (
|
2025-03-30 19:28:28 -03:00
|
|
|
<div className="p-3">
|
|
|
|
<div className="mb-5">
|
|
|
|
<h2 className="text-lg font-bold mb-2">Discover</h2>
|
|
|
|
<div className="space-y-1 ml-2">
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Listen Now</button>
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Browse</button>
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Radio</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mb-5">
|
|
|
|
<h2 className="text-lg font-bold mb-2">Library</h2>
|
|
|
|
<div className="space-y-1 ml-2">
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Playlists</button>
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Songs</button>
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Made for You</button>
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Artists</button>
|
|
|
|
<button className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">Albums</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<h2 className="text-lg font-bold mb-2">Playlists</h2>
|
|
|
|
<div className="max-h-72 overflow-y-auto">
|
2025-03-30 16:42:51 -03:00
|
|
|
{playlists?.map((playlist, i) => (
|
2025-03-30 19:28:28 -03:00
|
|
|
<button key={i} className="block w-full text-left px-2 py-1 text-sm hover:bg-gray-100 rounded">
|
|
|
|
{playlist}
|
|
|
|
</button>
|
2025-03-30 16:42:51 -03:00
|
|
|
))}
|
2025-03-30 19:28:28 -03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2025-03-30 16:42:51 -03:00
|
|
|
}
|