Skip to content

update svg path in docs#23

Open
ToddG wants to merge 1 commit intolpil:mainfrom
ToddG:toddg/fix-documentation-reference-to-svg
Open

update svg path in docs#23
ToddG wants to merge 1 commit intolpil:mainfrom
ToddG:toddg/fix-documentation-reference-to-svg

Conversation

@ToddG
Copy link

@ToddG ToddG commented Jan 13, 2026

PR to update documentation's reference to lustre's svg() function.

See: #22 (comment)

Copy link
Owner

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@lpil
Copy link
Owner

lpil commented Jan 14, 2026

Looking at the docs now, wasn't it correct before? https://hexdocs.pm/lustre/lustre/element/html.html#svg

@ToddG
Copy link
Author

ToddG commented Jan 14, 2026

Per the original thread, I was seeing an import error when following the docs:

#22 (comment)

Copy link
Owner

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see it now, left a note inline

/// If you are only using SVGs, that's all you need to import
/// ```gleam
/// import lustre/element/svg
/// import lustre/element/svg.{svg}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The svg function comes from the other module already. Importing two values with the same name would result in a type error

Suggested change
/// import lustre/element/svg.{svg}
/// import lustre/element/svg

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.

2 participants