Conditionally rendering components in a shared template #799
Answered
by
luwes
endymion1818
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
luwes
Feb 1, 2024
Replies: 1 comment 3 replies
-
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 |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
endymion1818
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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