mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 11:21:46 +00:00
feat: migrate from raw HTML to JSX (TSX / SolidJS) (#3583)
Co-authored-by: Su-Yong <simssy2205@gmail.com>
This commit is contained in:
25
src/plugins/video-toggle/templates/video-switch-button.tsx
Normal file
25
src/plugins/video-toggle/templates/video-switch-button.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
export interface VideoSwitchButtonProps {
|
||||
onClick?: (event: MouseEvent) => void;
|
||||
onChange?: (event: Event) => void;
|
||||
songButtonText: string;
|
||||
videoButtonText: string;
|
||||
}
|
||||
|
||||
export const VideoSwitchButton = (props: VideoSwitchButtonProps) => (
|
||||
<div
|
||||
class="video-switch-button"
|
||||
data-video-button-text={props.videoButtonText}
|
||||
on:click={props.onClick}
|
||||
onChange={props.onChange}
|
||||
>
|
||||
<input
|
||||
checked={true}
|
||||
id="video-toggle-video-switch-button-checkbox"
|
||||
class="video-switch-button-checkbox"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label class="video-switch-button-label" for="video-toggle-video-switch-button-checkbox">
|
||||
<span class="video-switch-button-label-span">{props.songButtonText}</span>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
Reference in New Issue
Block a user