diff options
author | 2021-09-27 01:33:15 -0700 | |
---|---|---|
committer | 2021-09-27 01:33:15 -0700 | |
commit | 86109dcfd008baf8778cc221cc25f90dd77121e9 (patch) | |
tree | f04bf172b671fcfa09b6c53a4f9d1143e405bb0b /examples/macros/mystery-box.tsx | |
parent | adf22db8b675c482c7f0a5ac4e659ea5374aa8fc (diff) | |
download | bun-86109dcfd008baf8778cc221cc25f90dd77121e9.tar.gz bun-86109dcfd008baf8778cc221cc25f90dd77121e9.tar.zst bun-86109dcfd008baf8778cc221cc25f90dd77121e9.zip |
Add a few macros examples
Diffstat (limited to 'examples/macros/mystery-box.tsx')
-rw-r--r-- | examples/macros/mystery-box.tsx | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/examples/macros/mystery-box.tsx b/examples/macros/mystery-box.tsx deleted file mode 100644 index 9e72ee1c0..000000000 --- a/examples/macros/mystery-box.tsx +++ /dev/null @@ -1,15 +0,0 @@ -// macro code: -export function mysteryBox(node) { - const dice = Math.round(Math.random() * 100); - if (dice < 25) { - return <number value={5} />; - } else if (dice < 50) { - return <true />; - } else if (dice < 75) { - return <false />; - } else if (dice < 90) { - return <string value="a string" />; - } else { - return <string value={"a very rare string " + dice.toString(10)} />; - } -} |