mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-08 15:59:51 +00:00
Add prepended text to ToggleConfig
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
type ToggleConfigProps = {
|
type ToggleConfigProps = {
|
||||||
name: string;
|
name: string;
|
||||||
value: boolean;
|
value: boolean;
|
||||||
|
text?: string;
|
||||||
updateCallback: (name: string, value: boolean) => void;
|
updateCallback: (name: string, value: boolean) => void;
|
||||||
resetCallback?: (arg0: boolean) => void;
|
resetCallback?: (arg0: boolean) => void;
|
||||||
onValue?: boolean | string;
|
onValue?: boolean | string;
|
||||||
@@ -10,11 +11,13 @@ type ToggleConfigProps = {
|
|||||||
const ToggleConfig = ({
|
const ToggleConfig = ({
|
||||||
name,
|
name,
|
||||||
value,
|
value,
|
||||||
|
text,
|
||||||
updateCallback,
|
updateCallback,
|
||||||
resetCallback = undefined,
|
resetCallback = undefined,
|
||||||
}: ToggleConfigProps) => {
|
}: ToggleConfigProps) => {
|
||||||
return (
|
return (
|
||||||
<div className="toggle">
|
<div className="toggle">
|
||||||
|
{text && <p>{text}</p>}
|
||||||
<div className="toggleBox">
|
<div className="toggleBox">
|
||||||
<input
|
<input
|
||||||
name={name}
|
name={name}
|
||||||
|
|||||||
@@ -485,9 +485,9 @@ const Video = () => {
|
|||||||
</h3>
|
</h3>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<p>Autoplay:</p>
|
|
||||||
<ToggleConfig
|
<ToggleConfig
|
||||||
name="Autoplay:"
|
name="playlist-autoplay"
|
||||||
|
text="Autoplay:"
|
||||||
value={
|
value={
|
||||||
playlistAutoplay &&
|
playlistAutoplay &&
|
||||||
playlistIdForAutoplay === playlistItem.playlist_meta.playlist_id
|
playlistIdForAutoplay === playlistItem.playlist_meta.playlist_id
|
||||||
|
|||||||
Reference in New Issue
Block a user