fix: width in PageHeader comp (#7866)

Fixes: #7864 


This fix prevents layout issues caused by invalid CSS and ensures that
the PageHeader component works correctly when no width prop is passed.

![Screenshot from 2024-10-20
00-03-39](https://github.com/user-attachments/assets/68340256-c756-4a56-9028-9aed32caf68e)

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Harsh Singh
2024-10-21 22:10:32 +05:30
committed by GitHub
parent 5416773951
commit 11c3f1c399

View File

@ -31,7 +31,7 @@ const StyledTopBarContainer = styled.div<{ width?: number }>`
padding: ${({ theme }) => theme.spacing(2)}; padding: ${({ theme }) => theme.spacing(2)};
padding-left: 0; padding-left: 0;
padding-right: ${({ theme }) => theme.spacing(3)}; padding-right: ${({ theme }) => theme.spacing(3)};
width: ${({ width }) => width + 'px' || '100%'}; width: ${({ width }) => (width ? `${width}px` : '100%')};
@media (max-width: ${MOBILE_VIEWPORT}px) { @media (max-width: ${MOBILE_VIEWPORT}px) {
width: 100%; width: 100%;