UNPKG

@primer/react-brand

Version:

Primer Brand is a GitHub's design system for creating React-based marketing websites and digital experiences.

25 lines (24 loc) 943 B
import e from "../../../node_modules/clsx/dist/clsx.js"; import { Text as t } from "../../../Text/Text.js"; import n from "../../VideoPlayer.module.js"; import { useVideo as r } from "../../hooks/useVideo.js"; import { VideoTooltip as i } from "../VideoTooltip/VideoTooltip.js"; import "react"; import { jsx as a, jsxs as o } from "react/jsx-runtime"; //#region src/VideoPlayer/components/CCButton/CCButton.tsx var s = ({ className: s, ...c }) => { let { ccEnabled: l, toggleCC: u } = r(); return /* @__PURE__ */ o("button", { className: e(s, n.VideoPlayer__iconControl, n.VideoPlayer__closedCaption, !l && n.VideoPlayer__ccOff), onClick: u, ...c, children: [/* @__PURE__ */ a(t, { className: n.VideoPlayer__ccText, "aria-hidden": "true", children: "CC" }), /* @__PURE__ */ a(i, { children: l ? "Disable captions" : "Enable captions" })] }); }; //#endregion export { s as CCButton }; //# sourceMappingURL=CCButton.js.map