diff options
Diffstat (limited to 'packages/astro/test/fixtures/astro-expr/src/pages/switch.astro')
-rw-r--r-- | packages/astro/test/fixtures/astro-expr/src/pages/switch.astro | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/astro/test/fixtures/astro-expr/src/pages/switch.astro b/packages/astro/test/fixtures/astro-expr/src/pages/switch.astro new file mode 100644 index 000000000..ded58613e --- /dev/null +++ b/packages/astro/test/fixtures/astro-expr/src/pages/switch.astro @@ -0,0 +1,20 @@ +--- +let title = 'Switch'; +let colors = ['red', 'yellow', 'blue']; +--- + +<html> +<head> + <title>{title}</title> +</head> +<body> + {() => { + const color = colors[1]; + switch (color) { + case 'red': return <div id="red">red</div>; + case 'yellow': return <div id="yellow">yellow</div> + case 'blue': return <div id="blue">blue</div> + } + }} +</body> +</html> |