Say I want to make a <Rectangle Width="x%" />
where x
is a variable from a JS module. How would I go about this?
To clarify, this is the sort of thing I have tried:
<JavaScript>
var Observable = require("FuseJS/Observable");
var number = Observable(25);
module.exports = {
number: number
};
</JavaScript>
<Rectangle Width="{number}%" Height="100%" Fill="Blue" Alignment="Left" />