Skip to content

Commit

Permalink
Converted portal.spec to tsx and added math formula elements to allow…
Browse files Browse the repository at this point in the history
…ed types #1632
  • Loading branch information
Havunen committed Mar 25, 2023
1 parent 6f5bb9d commit 601f754
Show file tree
Hide file tree
Showing 6 changed files with 2,497 additions and 110 deletions.
70 changes: 70 additions & 0 deletions docs/math-elements/app.js
@@ -0,0 +1,70 @@
import { Component, render } from 'inferno';

class Demo extends Component {
constructor(props, context) {
super(props, context);

this.state = {
numPoints: 0
};

this.updateCount = this.updateCount.bind(this);
}

updateCount(e) {
this.setState({
numPoints: e.target.value
});
}

componentDidMount() {
this.setState({
numPoints: 1000
});
}

render(props, state) {
return (
<div className="app-wrapper">
<p>
The infinite sum
<math display="block">
<mrow>
<munderover>
<mo></mo>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow>
<mo>+</mo>
<mn></mn>
</mrow>
</munderover>
<mfrac>
<mn>1</mn>
<msup>
<mi>n</mi>
<mn>2</mn>
</msup>
</mfrac>
</mrow>
</math>
is equal to the real number
<math display="inline">
<mfrac>
<msup>
<mi>π</mi>
<mn>2</mn>
</msup>
<mn>6</mn>
</mfrac></math
>.
</p>
</div>
);
}
}

render(<Demo />, document.getElementById('app'));

0 comments on commit 601f754

Please sign in to comment.