Skip to content

Commit 52562d8

Browse files
committed
fix: revert spread props in icons, conditionally apply style object to images only
1 parent 6d77ebe commit 52562d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/pluggableWidgets/image-web/src/Image.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const Image: FunctionComponent<ImageContainerProps> = props => {
6161
const { type, image } = getImageProps(props);
6262

6363
const altText = props.alternativeText?.status === ValueStatus.Available ? props.alternativeText.value : undefined;
64-
const styleObject = constructStyleObject(props);
64+
const styleObject = type === "image" && constructStyleObject(props);
6565

6666
const imageStyle = { ...props.style, ...styleObject };
6767

packages/pluggableWidgets/image-web/src/components/Image/ui.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function ContentIcon(props: ImageContentIcon): ReactElement {
6969
return (
7070
<span
7171
className={classNames(props.icon, { glyphicon: props.isGlyph })}
72-
style={{ fontSize: `${props.size}px` }}
72+
style={{ ...props.style, fontSize: `${props.size}px` }}
7373
{...accessibilityProps}
7474
{...onClickProps}
7575
/>

0 commit comments

Comments
 (0)