Open source video conferencing app powered by LiveKit. Built with Django and React.
π(frontend) fix icon centering in the Switch primitive
lebaudantoine58205f81d4cf
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9e8f586c..79bc89eb 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -46,6 +46,7 @@ and this project adheres to- π(frontend) stop the installed app reopening the room it came from- π(backend) serialize lazy title in summary payload- π(frontend) show pointer cursor on interactive switches+- π(frontend) fix icon centering in the Switch primitive## [1.24.0] - 2026-07-21diff --git a/src/frontend/src/primitives/Switch.tsx b/src/frontend/src/primitives/Switch.tsxindex 91d4a567..8713be28 100644--- a/src/frontend/src/primitives/Switch.tsx+++ b/src/frontend/src/primitives/Switch.tsx@@ -35,30 +35,29 @@ const StyledSwitch = styled(RACSwitch, {transitionDelay: '0ms',},},- '& .checkmark': {+ '& .checkmark, & .cross': {position: 'absolute',- display: 'block',- top: '50%',- right: '0.1rem',- transform: 'translateY(-50%)',- color: 'primary.800',- fontSize: '0.75rem',- fontWeight: 'bold',+ top: 0,+ bottom: 0,+ width: '1.313rem', // knob width + 2 Γ knob margin+ display: 'grid',+ placeItems: 'center',pointerEvents: 'none',zIndex: 1,+ '& svg': {+ display: 'block',+ width: '0.875rem',+ height: '0.875rem',+ },+ },+ '& .checkmark': {+ right: 0,+ color: 'primary.800',opacity: 0,},'& .cross': {- position: 'absolute',- display: 'block',- top: '50%',- left: '0.13rem',- transform: 'translateY(-50%)',+ left: 0,color: 'white',- fontSize: '0.70rem',- fontWeight: 'bold',- pointerEvents: 'none',- zIndex: 1,opacity: 1,transition: 'opacity 200ms',transitionDelay: '0ms',@@ -115,10 +114,10 @@ export const Switch = ({ children, ...props }: SwitchProps) => (<><div className="indicator"><span className="checkmark" aria-hidden="true">- <RiCheckLine size={16} />+ <RiCheckLine /></span><span className="cross" aria-hidden="true">- <RiCloseFill size={16} />+ <RiCloseFill /></span></div>{typeof children === 'function' ? children(renderProps) : children}