9c9c34fccf
Migrates `twenty-front`, `twenty-sdk`, and `twenty-front-component-renderer` from `twenty-ui-deprecated` to `twenty-ui` (mechanical import swap — the packages have API parity) and deletes the deprecated package along with its workspace/CI/config wiring. Also adds `@linaria/react`/`@linaria/core` as direct deps of `twenty-front` (it used them transitively via the deprecated package). Note: move the required status check from `ci-ui-status-check` to `ci-new-ui-status-check`. Argos: the Storybook box-model/button-reset baseline shift (the bulk of the visual diffs) is isolated in #21665 — Storybook now loads twenty-ui's global `reset.scss`, which the production app already ships. Once #21665 merges and this branch is rebased, the remaining Argos diffs are component-level visual-parity items only.
53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';
|
|
import { css } from '@linaria/core';
|
|
import { styled } from '@linaria/react';
|
|
import { useContext } from 'react';
|
|
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
|
import { ThemeContext } from 'twenty-ui/theme-constants';
|
|
|
|
const StyledSkeletonContainer = styled.div`
|
|
align-items: flex-start;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
width: 100%;
|
|
`;
|
|
|
|
const fillSkeletonContainer = css`
|
|
display: block;
|
|
width: 100%;
|
|
`;
|
|
|
|
export const MainNavigationDrawerItemsSkeletonLoader = ({
|
|
title,
|
|
length,
|
|
}: {
|
|
title?: boolean;
|
|
length: number;
|
|
}) => {
|
|
const { theme } = useContext(ThemeContext);
|
|
return (
|
|
<StyledSkeletonContainer>
|
|
<SkeletonTheme
|
|
baseColor={theme.background.tertiary}
|
|
highlightColor={theme.background.transparent.lighter}
|
|
borderRadius={4}
|
|
>
|
|
{title && (
|
|
<Skeleton
|
|
width={48}
|
|
height={SKELETON_LOADER_HEIGHT_SIZES.standard.xs}
|
|
/>
|
|
)}
|
|
{Array.from({ length }).map((_, index) => (
|
|
<Skeleton
|
|
key={index}
|
|
containerClassName={fillSkeletonContainer}
|
|
height={SKELETON_LOADER_HEIGHT_SIZES.standard.s}
|
|
/>
|
|
))}
|
|
</SkeletonTheme>
|
|
</StyledSkeletonContainer>
|
|
);
|
|
};
|