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