CM: Render dice-d6 as fallback icon if no component icon was set

This commit is contained in:
Gustav Hansen 2022-05-05 22:42:35 +02:00
parent 4f1dd6f260
commit ef4f5e7366
3 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ DynamicComponentCard.defaultProps = {
children: null,
friendlyName: '',
onClick: () => {},
icon: 'smile',
icon: 'dice-d6',
};
DynamicComponentCard.propTypes = {

View File

@ -74,7 +74,7 @@ function ComponentCard({ componentUid, intlLabel, icon, onClick }) {
}
ComponentCard.defaultProps = {
icon: 'smile',
icon: 'dice-d6',
onClick: () => {},
};

View File

@ -106,7 +106,7 @@ function ComponentCard({ component, dzName, index, isActive, isInDevelopmentMode
paddingRight={4}
>
<StackCentered spacing={1}>
<StyledFontAwesomeIcon icon={icon} />
<StyledFontAwesomeIcon icon={icon || 'dice-d6'} />
<Box maxWidth={`calc(${pxToRem(140)} - 32px)`}>
<Typography variant="pi" fontWeight="bold" ellipsis>
{displayName}