Files
twenty/front/src/modules/ui/navbar/components/SubMenuNavbar.tsx
Charles Bochet d6afbe8e8e Introduce accent for chips (#911)
* Introduce accent for chips

* Add top bar on Mobile on Settings pages

* Various fixes

* Fix according to peer review
2023-07-24 16:49:33 -07:00

30 lines
772 B
TypeScript

import styled from '@emotion/styled';
import { useIsMobile } from '@/ui/hooks/useIsMobile';
import { leftNavbarWidth } from '../constants';
import NavBackButton from './NavBackButton';
import NavItemsContainer from './NavItemsContainer';
type OwnProps = {
children: React.ReactNode;
backButtonTitle: string;
};
const StyledContainer = styled.div`
display: flex;
flex-direction: column;
padding-top: ${({ theme }) => theme.spacing(9)};
width: ${() => (useIsMobile() ? '100%' : leftNavbarWidth.desktop)};
`;
export default function SubMenuNavbar({ children, backButtonTitle }: OwnProps) {
return (
<StyledContainer>
<NavBackButton title={backButtonTitle} />
<NavItemsContainer>{children}</NavItemsContainer>
</StyledContainer>
);
}