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:
@ -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,
|
||||
|
||||
@ -8,6 +8,7 @@ const StyledPanel = styled.div`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user