Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix storybook issue #48

Merged
merged 4 commits into from
Sep 24, 2024
Merged

fix: fix storybook issue #48

merged 4 commits into from
Sep 24, 2024

Conversation

isBatak
Copy link
Owner

@isBatak isBatak commented Sep 24, 2024

Fix storybook issue:

This causes storybook to mark SVG as invalid because image-size module fails to parse dimensions.

// Code from image-size
            const attrs = parseAttributes(root[0]);
            if (attrs.width && attrs.height) {
                return calculateByDimensions(attrs);
            }
            if (attrs.viewbox) {
                return calculateByViewbox(attrs, attrs.viewbox);
            }

@isBatak isBatak merged commit 464800c into main Sep 24, 2024
2 checks passed
@isBatak isBatak deleted the fix/add-viewbox-to-svg branch September 24, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant