Merge pull request #15656 from strapi/fix/AttributeIcon

This commit is contained in:
Jamie Howard 2023-02-02 10:04:19 +00:00 committed by GitHub
commit aaf50db93c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2000 additions and 1675 deletions

View File

@ -53,9 +53,10 @@ const iconByTypes = {
};
const IconBox = styled(Box)`
width: ${pxToRem(32)};
height: ${pxToRem(24)};
box-sizing: content-box;
svg {
height: 100%;
width: 100%;
}
`;
const AttributeIcon = ({ type, customField, ...rest }) => {
@ -75,7 +76,11 @@ const AttributeIcon = ({ type, customField, ...rest }) => {
return null;
}
return <IconBox as={Compo} {...rest} aria-hidden />;
return (
<IconBox height={pxToRem(24)} width={pxToRem(32)} shrink={0} {...rest} aria-hidden>
<Box as={Compo} />
</IconBox>
);
};
AttributeIcon.defaultProps = {