-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
type:enhancementNew feature or requestNew feature or request
Description
It might be a good idea to standardize the user facing component API so that we can guarantee component compatibility across themes.
I propose we do this with some sort of component constructor function. Here's an example:
// themes/linear/components/pro-con.typ
#let pro-con = make-pro-con((pros, cons)) => {
table(
// ...
)
})
The make-pro-con function can just return another function that then gets assigned to the pro-con variable.
This would guarantee cohesion without need for more in depth code review, and would also allow the make-pro-con function to parse the arguments first, allowing for error handling. This might also help us close #28 , since it would allow us to handle incorrectly passed arguments in once place, instead of on a per-component basis.
The end goal would be to make switching themes guarantee to work without compiler errors.
Metadata
Metadata
Assignees
Labels
type:enhancementNew feature or requestNew feature or request