feat: add individual actionName
This commit is contained in:
1 parent
ca02fe9e30
commit
1892314610
3 files changed
+7
-4
No files matched your search
@@ -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