Ui corrections #15
No files matched your search
+2
-1
@@ -231,8 +231,9 @@ export default function AdminPage() {
|
||||
</Card>
|
||||
</div>
|
||||
<Screens.Songs
|
||||
actionName="Auswählen"
|
||||
onSelectSong={(song) => console.log(song)}
|
||||
className="w-[600px]"
|
||||
className="w-min"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -90,6 +90,7 @@ export default function SenderPage() {
|
||||
|
||||
return (
|
||||
<Screens.Songs
|
||||
actionName="Anzeigen"
|
||||
onSelectSong={(song) => sendID(String(song.song_id), String(song.songbook_id))}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Input } from "./FormElements"
|
||||
|
||||
interface SongsProps extends Omit<ComponentPropsWithoutRef<typeof Card>, "title" | "children"> {
|
||||
onSelectSong?: (song: Song) => void;
|
||||
actionName?: string;
|
||||
}
|
||||
|
||||
interface Song {
|
||||
@@ -20,7 +21,7 @@ interface Songbook {
|
||||
language: string;
|
||||
}
|
||||
|
||||
function Songs({ onSelectSong, className = "", ...props }: SongsProps) {
|
||||
function Songs({ actionName, onSelectSong, className = "", ...props }: SongsProps) {
|
||||
const [song_search_name, setSongSearchName] = useState("");
|
||||
const [searchResults, setSearchResults] = useState<Song[]>([]);
|
||||
const [allSongs, setAllSongs] = useState<Song[]>([]);
|
||||
@@ -123,7 +124,7 @@ function Songs({ onSelectSong, className = "", ...props }: SongsProps) {
|
||||
onClick={() => onSelectSong?.(song)}
|
||||
className="bg-white dark:bg-black hover:bg-blue-600 dark:hover:bg-blue-600 border border-neutral-300 dark:border-neutral-700 hover:border-blue-600 dark:hover:border-blue-500 hover:text-white font-medium rounded-md px-3 py-1.5 transition text-xs"
|
||||
>
|
||||
Anzeigen
|
||||
{actionName}
|
||||
</Input.Button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in new issue
Block a user