Fix ParticipantChip and stories imports (#4974)

- Fix ParticipantChip
- Fix stories imports after some component have been moved to twenty UI
This commit is contained in:
bosiraphael
2024-04-15 18:09:05 +02:00
committed by GitHub
parent db2935b877
commit d7d9f0c16b
83 changed files with 189 additions and 216 deletions

View File

@ -1,7 +1,7 @@
import { Meta, StoryObj } from '@storybook/react';
import { ComponentDecorator } from 'twenty-ui';
import { Calendar } from '@/activities/calendar/components/Calendar';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';

View File

@ -1,9 +1,9 @@
import { useEffect } from 'react';
import { Meta, StoryObj } from '@storybook/react';
import { useSetRecoilState } from 'recoil';
import { ComponentDecorator } from 'twenty-ui';
import { viewableActivityIdState } from '@/activities/states/viewableActivityIdState';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { ActivityActionBar } from '../../right-drawer/components/ActivityActionBar';
import { Comment } from '../Comment';

View File

@ -24,9 +24,13 @@ const StyledContainer = styled.div`
display: flex;
`;
const StyledRecordChip = styled(RecordChip)<{ variant: 'default' | 'bold' }>`
font-weight: ${({ theme, variant }) =>
variant === 'bold' ? theme.font.weight.medium : theme.font.weight.regular};
const StyledRecordChip = styled(RecordChip)<{
participantChipVariant: 'default' | 'bold';
}>`
font-weight: ${({ theme, participantChipVariant }) =>
participantChipVariant === 'bold'
? theme.font.weight.medium
: theme.font.weight.regular};
`;
const StyledChip = styled.div`
@ -63,7 +67,7 @@ export const ParticipantChip = ({
<StyledRecordChip
objectNameSingular={CoreObjectNameSingular.Person}
record={person}
variant={variant}
participantChipVariant={variant}
/>
) : (
<StyledChip>

View File

@ -1,7 +1,6 @@
import styled from '@emotion/styled';
import { Meta, StoryObj } from '@storybook/react';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { ComponentDecorator } from 'twenty-ui';
import { CommentChip } from '../CommentChip';

View File

@ -1,7 +1,7 @@
import { Meta, StoryObj } from '@storybook/react';
import { ComponentDecorator } from 'twenty-ui';
import { TaskList } from '@/activities/tasks/components/TaskList';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';