Add back pickers on all pages, fix command menu (#2662)

* Add back pickers on all pages, fix command menu

* Fix lint
This commit is contained in:
Charles Bochet
2023-11-22 22:32:25 +01:00
committed by GitHub
parent 41c0cebf48
commit ec3cfe6fdb
42 changed files with 425 additions and 300 deletions

View File

@ -8,7 +8,7 @@ const StyledOuterContainer = styled.div`
display: flex;
gap: ${({ theme }) => (useIsMobile() ? theme.spacing(3) : '0')};
height: ${() => (useIsMobile() ? '100%' : 'auto')};
height: ${() => (useIsMobile() ? '100%' : '100%')};
overflow-x: ${() => (useIsMobile() ? 'hidden' : 'auto')};
width: 100%;
`;

View File

@ -31,6 +31,12 @@ const StyledInnerContainer = styled.div`
}};
`;
const StyledIntermediateContainer = styled.div`
display: flex;
flex-direction: column;
padding-bottom: ${({ theme }) => theme.spacing(3)};
`;
export type ShowPageLeftContainerProps = {
children: ReactElement[];
};
@ -46,7 +52,9 @@ export const ShowPageLeftContainer = ({
) : (
<StyledOuterContainer>
<ScrollWrapper>
<StyledInnerContainer>{children}</StyledInnerContainer>
<StyledIntermediateContainer>
<StyledInnerContainer>{children}</StyledInnerContainer>
</StyledIntermediateContainer>
</ScrollWrapper>
</StyledOuterContainer>
);

View File

@ -91,16 +91,18 @@ export const ShowPageSummaryCard = ({
const onFileChange = (e: ChangeEvent<HTMLInputElement>) => {
if (e.target.files) onUploadPicture?.(e.target.files[0]);
};
const handleAvatarClick = () => {
inputFileRef?.current?.click?.();
};
// Todo - add back in when we have the ability to upload a picture
// const handleAvatarClick = () => {
// inputFileRef?.current?.click?.();
// };
return (
<StyledShowPageSummaryCard>
<StyledAvatarWrapper>
<Avatar
avatarUrl={logoOrAvatar}
onClick={onUploadPicture ? handleAvatarClick : undefined}
// onClick={onUploadPicture ? handleAvatarClick : undefined}
size="xl"
colorId={id}
placeholder={title}