JSFiddle - React, Tailwind, and code Playground

by valchev

HTML

<script src="http://cdn.kendostatic.com/2012.2.710/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.710/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.710/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.710/styles/kendo.mobile.all.min.css">
<div id="container">
    <label>Underlying Par: <input data-bind="value: underlyingPar" /></label>
    <br />
    <label>Underlying Price: <input data-bind="value: underlyingPrice" /></label>
    <br />
    <label>Floater Price: <input data-bind="value: floaterPrice" /></label>
    <br />
    <label>Bind Proceeds: <span data-bind="text: BondProceeds" /></label>
    <br />
    <label>Total Amount:<span data-bind="text: TotalAmount" ></span></label>
</div>

JavaScript

var viewModel = kendo.observable({
    underlyingPar: 100,
    underlyingPrice: 100,
    floaterPrice: 100,
    BondProceeds: function () {
        return this.get("underlyingPar") * (this.get("underlyingPrice") / 100)
    },
    TotalAmount: function () {
        return this.BondProceeds() - this.get("floaterPrice")
    }
});


kendo.bind($("#container"), viewModel)