Skip to content

Conditionally rendering components in a shared template #799

Answered by luwes
endymion1818 asked this question in Q&A
Discussion options

You must be logged in to vote

the theme syntax is intentionally made very simple and less featured than JS syntax for example so conditional && or || are not supported.

conditionals are done like so https://www.media-chrome.org/docs/en/themes#conditionals

got it working in a fork
https://codesandbox.io/p/devbox/media-chrome-theme-conditional-3dx4kt

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@endymion1818
Comment options

@luwes
Comment options

luwes Feb 1, 2024
Maintainer

@endymion1818
Comment options

Answer selected by endymion1818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants