3 ms·
But then how would you support choices or conditions for example?
by steve_adams_86 2y ago
But then how would you support choices or conditions for example?
- notpushkin 2y agoMaybe something like this for choices? fruits = MultiChoiceInput # What are your favourite fruits? - [ ] Apples - [ ] Oranges - [ ] Bananas Personally I'd prefer good old MDX though: <MultiChoiceInput name="fruits" hideIf={name.value !== "FruitLover"} options={["Apples", "Oranges", "Bananas]} />
- mg 2y agoWell, you can define the syntax however you like in a new DSL, right? I like the syntax notpushkin proposed and would extend it a bit like this: fruits* = MultiChoiceInput # Pick two out of three fruits Fruits are healthy, so let's pick two fruits you will eat every morning for the coming week - [ ] Apple - [ ] Orange - [ ] Banana
- Terretta 2y agoAll such text markup DSLs were invented at least once on usenet.