Fix linked to this discord issue: https://discord.com/channels/1130383047699738754/1329509340494692444 --------- Co-authored-by: Weiko <corentin@twenty.com>
34 lines
896 B
TypeScript
34 lines
896 B
TypeScript
import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';
|
|
import { useTheme } from '@emotion/react';
|
|
import styled from '@emotion/styled';
|
|
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
|
|
|
const StyledRightDrawerContainer = styled.div`
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
padding: ${({ theme }) => theme.spacing(4)};
|
|
`;
|
|
|
|
const StyledSkeletonLoader = () => {
|
|
const theme = useTheme();
|
|
|
|
return (
|
|
<SkeletonTheme
|
|
baseColor={theme.background.tertiary}
|
|
highlightColor={theme.background.transparent.lighter}
|
|
borderRadius={4}
|
|
>
|
|
<Skeleton height={SKELETON_LOADER_HEIGHT_SIZES.standard.m} width={140} />
|
|
</SkeletonTheme>
|
|
);
|
|
};
|
|
|
|
export const RightDrawerSkeletonLoader = () => {
|
|
return (
|
|
<StyledRightDrawerContainer>
|
|
<StyledSkeletonLoader />
|
|
</StyledRightDrawerContainer>
|
|
);
|
|
};
|