mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-05 00:39:28 +00:00
Add prepended text to ToggleConfig
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user