Add prepended text to ToggleConfig

This commit is contained in:
MerlinScheurer 2025-01-12 14:32:58 +01:00
parent 6549b52112
commit 851b499754
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
type ToggleConfigProps = {
name: string;
value: boolean;
text?: string;
updateCallback: (name: string, value: boolean) => void;
resetCallback?: (arg0: boolean) => void;
onValue?: boolean | string;
@ -10,11 +11,13 @@ type ToggleConfigProps = {
const ToggleConfig = ({
name,
value,
text,
updateCallback,
resetCallback = undefined,
}: ToggleConfigProps) => {
return (
<div className="toggle">
{text && <p>{text}</p>}
<div className="toggleBox">
<input
name={name}

View File

@ -485,9 +485,9 @@ const Video = () => {
</h3>
</Link>
<p>Autoplay:</p>
<ToggleConfig
name="Autoplay:"
name="playlist-autoplay"
text="Autoplay:"
value={
playlistAutoplay &&
playlistIdForAutoplay === playlistItem.playlist_meta.playlist_id