Add prepended text to ToggleConfig
This commit is contained in:
parent
6549b52112
commit
851b499754
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue