feat: record group chevron button (#9645)

This ticket is related to this Discord post
https://discord.com/channels/1130383047699738754/1328756649657110559
This commit is contained in:
Jérémy M
2025-01-16 10:03:05 +01:00
committed by GitHub
parent f077efd171
commit f5b0926b63
8 changed files with 279 additions and 21 deletions

View File

@ -1,8 +1,12 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { motion } from 'framer-motion';
import { useCallback } from 'react';
import { IconChevronDown, isDefined, Tag } from 'twenty-ui';
import {
AnimatedLightIconButton,
IconChevronDown,
isDefined,
Tag,
} from 'twenty-ui';
import { useCurrentRecordGroupId } from '@/object-record/record-group/hooks/useCurrentRecordGroupId';
import { recordGroupDefinitionFamilyState } from '@/object-record/record-group/states/recordGroupDefinitionFamilyState';
@ -84,15 +88,13 @@ export const RecordTableRecordGroupSection = () => {
<StyledTrContainer onClick={handleDropdownToggle}>
<td aria-hidden />
<StyledChevronContainer>
<motion.span
<AnimatedLightIconButton
Icon={IconChevronDown}
size="small"
accent="secondary"
animate={{ rotate: !isRecordGroupTableSectionToggled ? -90 : 0 }}
transition={{ duration: theme.animation.duration.normal }}
style={{
display: 'inline-block',
}}
>
<IconChevronDown size={theme.icon.size.md} />
</motion.span>
/>
</StyledChevronContainer>
<StyledRecordGroupSection className="disable-shadow">
<Tag