From 4a3528c26ee0d17603e27922cd899421db783464 Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Mon, 21 Oct 2024 12:02:00 +0100 Subject: [PATCH] duckplayer: remove label click trigger on mobile (#1121) * duckplayer: remove label click trigger on mobile * remove pointer events for the label * allow animations --------- Co-authored-by: Shane Osbourne --- .../pages/duckplayer/app/components/Switch.jsx | 4 +++- .../app/components/SwitchBarMobile.jsx | 18 +++++++++++------- .../app/components/SwitchBarMobile.module.css | 7 ++++++- special-pages/tests/duckplayer.spec.js | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/special-pages/pages/duckplayer/app/components/Switch.jsx b/special-pages/pages/duckplayer/app/components/Switch.jsx index 2b53ffdb3..ac27205f8 100644 --- a/special-pages/pages/duckplayer/app/components/Switch.jsx +++ b/special-pages/pages/duckplayer/app/components/Switch.jsx @@ -9,12 +9,14 @@ import cn from "classnames"; * @param {boolean} props.checked - Indicates whether the switch is checked or not. * @param {() => void} props.onChange - The callback function to be called when the switch is toggled. * @param {ImportMeta['platform']} props.platformName - The callback function to be called when the switch is toggled. + * @param {string} props.id */ -export function Switch({ checked, onChange, platformName = 'ios' }) { +export function Switch({ checked, onChange, id, platformName = 'ios' }) { return (