Main #21
No files matched your search
@@ -232,6 +232,7 @@ export default function AdminPage() {
|
||||
</div>
|
||||
<Screens.Songs
|
||||
onSelectSong={(song) => console.log(song)}
|
||||
className="w-[600px]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { useState, useEffect, ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import Card from "./Card"
|
||||
import { Input } from "./FormElements"
|
||||
|
||||
interface SongsProps {
|
||||
interface SongsProps extends Omit<ComponentPropsWithoutRef<typeof Card>, "title" | "children"> {
|
||||
onSelectSong?: (song: Song) => void;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ interface Songbook {
|
||||
language: string;
|
||||
}
|
||||
|
||||
function Songs({onSelectSong}: SongsProps) {
|
||||
function Songs({ onSelectSong, className = "", ...props }: SongsProps) {
|
||||
const [song_search_name, setSongSearchName] = useState("");
|
||||
const [searchResults, setSearchResults] = useState<Song[]>([]);
|
||||
const [allSongs, setAllSongs] = useState<Song[]>([]);
|
||||
@@ -72,7 +72,11 @@ function Songs({onSelectSong}: SongsProps) {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Card title="Alle Lieder" className="h-[500px]">
|
||||
<Card
|
||||
{...props}
|
||||
title="Alle Lieder"
|
||||
className={`h-[500px] ${className}`}
|
||||
>
|
||||
<div className="mb-4">
|
||||
<Input.Text
|
||||
type="text"
|
||||
|
||||
Reference in new issue
Block a user