providers/import: Need a better way to include components #13

Closed
opened 2024-12-09 14:18:31 -07:00 by sashakoshka · 2 comments
Owner

The current way to do it is:

{{includeHTML "component.step" (list arg1 arg2 arg3)}}

This is okay under most circumstances, but wordy, and we cannot pass a relative path (very important!) etc.

The current way to do it is: ``` {{includeHTML "component.step" (list arg1 arg2 arg3)}} ``` This is okay under most circumstances, but wordy, and we cannot pass a relative path (very important!) etc.
Author
Owner

Since a slice (can be any kind, we have the power of reflection at our disposal) is probably the easiest thing for a component to accept, we should have a new function that takes in a path to the component, and a vararg list of arguments. We should also expose Document.Rel somehow, but with a very consice name. Can't conflict with the sprig functions, though.

Since a slice (can be any kind, we have the power of reflection at our disposal) is probably the easiest thing for a component to accept, we should have a new function that takes in a path to the component, and a vararg list of arguments. We should also expose Document.Rel somehow, but with a very consice name. Can't conflict with the sprig functions, though.
Author
Owner
{{createHTML "component.step" arg1 arg2 arg3}}
``` {{createHTML "component.step" arg1 arg2 arg3}} ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sashakoshka/step#13
No description provided.