From 7d46032fc6518386c6914225ac1dabc506b1d2a4 Mon Sep 17 00:00:00 2001 From: Nicholas VanCise <40526638+thenick775@users.noreply.github.com> Date: Tue, 7 Jan 2025 10:31:46 -0800 Subject: [PATCH] fix: semantic html for panel control sliders (#239) --- .../__snapshots__/control-panel.spec.tsx.snap | 964 +++++++++--------- .../src/components/controls/control-panel.tsx | 40 +- 2 files changed, 513 insertions(+), 491 deletions(-) diff --git a/gbajs3/src/components/controls/__snapshots__/control-panel.spec.tsx.snap b/gbajs3/src/components/controls/__snapshots__/control-panel.spec.tsx.snap index 5fe163b5..3cd39c16 100644 --- a/gbajs3/src/components/controls/__snapshots__/control-panel.spec.tsx.snap +++ b/gbajs3/src/components/controls/__snapshots__/control-panel.spec.tsx.snap @@ -235,281 +235,289 @@ exports[` > renders with default desktop position and size 1`] = - -
  • - - - - - - - - - - - - - - - + + + + - + + + + + + + + +
  • -
    - + + + + + + + +
  • -
  • - - - - - - - - - + + + + - + + + + + + - - -
  • - + + + + + + +
    @@ -745,281 +753,289 @@ exports[` > renders with default mobile position and size 1`] = - -
  • - - - - - - - - - - - - - - - + + + + - + + + + + + + + +
  • -
    - + + + + + + + +
  • -
  • - - - - - - - - - + + + + - + + + + + + - - -
  • - + + + + + + +
    diff --git a/gbajs3/src/components/controls/control-panel.tsx b/gbajs3/src/components/controls/control-panel.tsx index 375ba41b..1857d4aa 100644 --- a/gbajs3/src/components/controls/control-panel.tsx +++ b/gbajs3/src/components/controls/control-panel.tsx @@ -163,7 +163,7 @@ const PanelControlButton = styled(ButtonBase).attrs({ } `; -const PanelControlSlider = styled.li` +const PanelControlSlider = styled.div` ${InteractivePanelControlStyle} grid-area: ${({ $gridArea }) => $gridArea}; max-height: 40px; @@ -223,22 +223,28 @@ const SliderIconButton = ({ icon, ...rest }: SliderIconButtonProps) => { const PanelSlider = forwardRef( ({ controlled, gridArea, id, maxIcon, minIcon, ...rest }, ref) => ( - - - {minIcon} - - {maxIcon} - - + + + + {minIcon} + + {maxIcon} + + + ) );