feat: get object metadata from backend in Object Edit (#2125)

Closes #2009
This commit is contained in:
Thaïs
2023-10-19 17:14:29 +02:00
committed by GitHub
parent f35ea19f4d
commit 2f0da64e1b
4 changed files with 22 additions and 20 deletions

View File

@ -24,7 +24,7 @@ const StyledItemLabel = styled.div`
`;
type SettingsObjectIconWithLabelProps = {
Icon: IconComponent;
Icon?: IconComponent;
label: string;
};
@ -37,7 +37,9 @@ export const SettingsObjectIconWithLabel = ({
return (
<StyledContainer>
<StyledSubContainer>
<Icon size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />
{!!Icon && (
<Icon size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />
)}
<StyledItemLabel>{label}</StyledItemLabel>
</StyledSubContainer>
</StyledContainer>