Skip to content

Commit efdee60

Browse files
committed
md以下の時はヘッダーのトグルボタンの文字を非表示にした
1 parent 4add305 commit efdee60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t0016Next/myapp/src/components/button/ToggleVideoPositionButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { useVideo } from "@/providers/VideoProvider";
22

3-
export const ToggleVideoPositionButton = ({ textSize }: { textSize?: string }) => {
3+
export const ToggleVideoPositionButton = ({ isDisplayText, textSize }: { isDisplayText: boolean; textSize?: string }) => {
44
const { videoState, togglePosition } = useVideo();
55

66
// NOTE: デザイン模索中
77
// 本物のトグルならこっち
88
const text = "動画を固定";
99
return (
1010
<div className="flex h-full items-center">
11-
<span className={`${textSize ?? "text-xs"}`}>{text}</span>
11+
{isDisplayText === true && <span className={`${textSize ?? "text-xs"}`}>{text}</span>}
1212
<label className="flex h-full items-center">
1313
<input type="checkbox" checked={videoState.position === "footer"} className="peer sr-only" onChange={() => togglePosition()} />
1414
<span

0 commit comments

Comments
 (0)