Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit f6e74de

Browse files
author
James Collier
committed
Set svg height and width properties.
If these properties are not set, then under some conditions browsers will render the svg with zero height and width.
1 parent 8771698 commit f6e74de

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ export const Molecule: React.FC<MoleculeProps> = (props: MoleculeProps) => {
451451
<svg
452452
xmlns="http://www.w3.org/2000/svg"
453453
viewBox={`0 0 ${width} ${height}`}
454+
width={props.width || 100}
455+
height={props.height || 100}
454456
style={{ pointerEvents: "none" }}
455457
>
456458
<g

0 commit comments

Comments
 (0)