You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To include card labels, the add_card_button_srv function allows you to specify the card_fun along with a label parameter for customizing the card's title and content. This feature enables you to utilize the label shiny input and incorporate it into your card_fun to set the title.
When it comes to teal modules, each module has its own structure for the card_fun, but there are common elements shared across all card_function that can be standardized within a card_template function. You can find an example of this in the following code:
The challenge lies in deciding where to place the card_template function, as keeping it within teal.reporter adds teal as a dependent package. Here are a few suggestions:
Option 1:
Move the card_template() function to teal as an exported function. Instead of teal.reporter.
Option 2:
Create a separate card_template for each module (e.g., tmc, tmg, tmh) to ensure module-specific customization. As done previously.
Option 3:
Consider adding teal as a dependency to teal.reporter to retain the card_template function.
Code of Conduct
I agree to follow this project's Code of Conduct.
Contribution Guidelines
I agree to follow this project's Contribution Guidelines.
Security Policy
I agree to follow this project's Security Policy.
The text was updated successfully, but these errors were encountered:
What is your question?
To include card labels, the
add_card_button_srv
function allows you to specify thecard_fun
along with a label parameter for customizing the card's title and content. This feature enables you to utilize the label shiny input and incorporate it into yourcard_fun
to set the title.When it comes to teal modules, each module has its own structure for the
card_fun
, but there are common elements shared across all card_function that can be standardized within acard_template
function. You can find an example of this in the following code:Teal Reporter - card_template function
This card_template function can be further encapsulated to suit specific requirements, as demonstrated here:
Teal Goshawk - customized card_template
The challenge lies in deciding where to place the card_template function, as keeping it within teal.reporter adds teal as a dependent package. Here are a few suggestions:
Option 1:
Move the card_template() function to teal as an exported function. Instead of teal.reporter.
Option 2:
Create a separate card_template for each module (e.g., tmc, tmg, tmh) to ensure module-specific customization. As done previously.
Option 3:
Consider adding teal as a dependency to teal.reporter to retain the card_template function.
Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: