feat: add Fields table to Object Detail page (#1988)

* feat: add Fields table to Object Detail page

Closes #1815

* refactor: add ObjectFieldDataType
This commit is contained in:
Thaïs
2023-10-13 11:51:11 +02:00
committed by GitHub
parent bd9a6c56fe
commit 818efd72d0
14 changed files with 342 additions and 58 deletions

View File

@ -40,7 +40,10 @@ export {
IconFileImport,
IconFileUpload,
IconForbid,
IconFreeRights,
IconGraph,
IconGripVertical,
IconHeadphones,
IconHeart,
IconHeartOff,
IconHelpCircle,
@ -60,13 +63,16 @@ export {
IconMinus,
IconMoneybag,
IconNotes,
IconNumbers,
IconPencil,
IconPhone,
IconPlane,
IconPlug,
IconPlus,
IconProgressCheck,
IconSearch,
IconSettings,
IconSocial,
IconTag,
IconTarget,
IconTargetArrow,

View File

@ -8,6 +8,7 @@ const StyledPanel = styled.div`
display: flex;
flex-direction: row;
height: 100%;
overflow: auto;
width: 100%;
`;

View File

@ -6,6 +6,7 @@ import { IconChevronDown, IconChevronUp } from '@/ui/icon';
type TableSectionProps = {
children: ReactNode;
isInitiallyExpanded?: boolean;
title: string;
};
@ -38,9 +39,13 @@ const StyledSectionContent = styled.div`
padding: ${({ theme }) => theme.spacing(2)} 0;
`;
export const TableSection = ({ children, title }: TableSectionProps) => {
export const TableSection = ({
children,
isInitiallyExpanded = true,
title,
}: TableSectionProps) => {
const theme = useTheme();
const [isExpanded, setIsExpanded] = useState(true);
const [isExpanded, setIsExpanded] = useState(isInitiallyExpanded);
const handleToggleSection = () =>
setIsExpanded((previousIsExpanded) => !previousIsExpanded);