diff options
| author | Pinapelz <yukais@pinapelz.com> | 2023-11-14 19:08:14 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2023-11-14 19:08:14 -0800 |
| commit | 7b6d5f1666e428c37c936bd6b01323c3a6399ac6 (patch) | |
| tree | 981126f91f26c7419600a7496e76a16af9fa6988 /src/app/components | |
| parent | a7701e6183956531a6930fac484acb52e22baf85 (diff) | |
Initial commit - barebone lrc player
Diffstat (limited to 'src/app/components')
| -rw-r--r-- | src/app/components/Control.tsx | 42 | ||||
| -rw-r--r-- | src/app/components/Video.tsx | 0 |
2 files changed, 42 insertions, 0 deletions
diff --git a/src/app/components/Control.tsx b/src/app/components/Control.tsx new file mode 100644 index 0000000..2ad2339 --- /dev/null +++ b/src/app/components/Control.tsx @@ -0,0 +1,42 @@ +import React from 'react'; + +function Control({ + onPlay, + onPause, + onReset, + current, + setCurrent, + recoverAutoScrollImmediately, +}: { + onPlay: () => void; + onPause: () => void; + onReset: () => void; + current: number; + setCurrent: (c: number) => void; + recoverAutoScrollImmediately: () => void; +}) { + return ( + <div className="flex items-center space-x-2 p-2 bg-gray-200"> + <button type="button" onClick={onPlay} className="btn"> + play + </button> + <button type="button" onClick={onPause} className="btn"> + pause + </button> + <button type="button" onClick={onReset} className="btn"> + reset + </button> + <input + type="number" + value={current} + onChange={(event) => setCurrent(Number(event.target.value))} + className="input" + /> + <button type="button" onClick={recoverAutoScrollImmediately} className="btn"> + recover auto scroll immediately + </button> + </div> + ); +} + +export default Control;
\ No newline at end of file diff --git a/src/app/components/Video.tsx b/src/app/components/Video.tsx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/components/Video.tsx |
