Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

design: fix icon on SSR

goenning4fd205990873
diff --git a/public/assets/styles/reset.scss b/public/assets/styles/reset.scss
index 70d2d6ffc..486ecf41b 100644
--- a/public/assets/styles/reset.scss
+++ b/public/assets/styles/reset.scss
@@ -66,5 +66,6 @@ h6 {
}
img {
+ max-width: 100%;
height: 100%;
}
diff --git a/public/components/common/Icon.tsx b/public/components/common/Icon.tsx
index 241d5fd85..0b982e50c 100644
--- a/public/components/common/Icon.tsx
+++ b/public/components/common/Icon.tsx
@@ -10,7 +10,8 @@ interface IconProps {
export const Icon = (props: IconProps) => {
if (typeof props.sprite === "string") {
- return <img height={props.height} width={props.width} className={props.className} src={props.sprite} />
+ const styles = { height: props.height && `${props.height}px`, width: props.width && `${props.width}px` }
+ return <img style={styles} height={props.height} width={props.width} className={props.className} src={props.sprite} />
}
return (