🐛(frontend) resolve conflicting styles in SidePanel component

Fix regression caused by competing styling methods in Box component. Remove
duplicate position properties and standardize on simple div with css-in-js
approach to prevent style conflicts and unexpected layout behavior.
This commit is contained in:
lebaudantoine
2025-03-06 00:04:20 +01:00
committed by aleb_the_flash
parent 19b88a2078
commit 356797d326

View File

@@ -2,7 +2,7 @@ import { layoutStore } from '@/stores/layout'
import { css } from '@/styled-system/css' import { css } from '@/styled-system/css'
import { Heading } from 'react-aria-components' import { Heading } from 'react-aria-components'
import { text } from '@/primitives/Text' import { text } from '@/primitives/Text'
import { Box, Button, Div } from '@/primitives' import { Button, Div } from '@/primitives'
import { RiCloseLine } from '@remixicon/react' import { RiCloseLine } from '@remixicon/react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { ParticipantsList } from './controls/Participants/ParticipantsList' import { ParticipantsList } from './controls/Participants/ParticipantsList'
@@ -28,9 +28,16 @@ const StyledSidePanel = ({
isClosed, isClosed,
closeButtonTooltip, closeButtonTooltip,
}: StyledSidePanelProps) => ( }: StyledSidePanelProps) => (
<Box <div
size="sm"
className={css({ className={css({
borderWidth: '1px',
borderStyle: 'solid',
borderColor: 'box.border',
backgroundColor: 'box.bg',
color: 'box.text',
borderRadius: 8,
flex: 1,
position: 'absolute',
overflow: 'hidden', overflow: 'hidden',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
@@ -41,7 +48,6 @@ const StyledSidePanel = ({
top: 0, top: 0,
bottom: '80px', bottom: '80px',
width: '360px', width: '360px',
position: 'absolute',
transition: '.5s cubic-bezier(.4,0,.2,1) 5ms', transition: '.5s cubic-bezier(.4,0,.2,1) 5ms',
})} })}
style={{ style={{
@@ -80,7 +86,7 @@ const StyledSidePanel = ({
</Button> </Button>
</Div> </Div>
{children} {children}
</Box> </div>
) )
type PanelProps = { type PanelProps = {