use prism-tomorrow.css
This commit is contained in:
31
docs/_style/prism-master/examples/prism-tsx.html
Normal file
31
docs/_style/prism-master/examples/prism-tsx.html
Normal file
@ -0,0 +1,31 @@
|
||||
<h2>Full example</h2>
|
||||
<pre><code>import * as React from 'react';
|
||||
|
||||
interface IState {
|
||||
clicks: number;
|
||||
}
|
||||
|
||||
export class Clicker extends React.Component<any, IState> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
clicks: 0,
|
||||
};
|
||||
}
|
||||
|
||||
public clickHandler = () => {
|
||||
this.setState({ clicks: this.state.clicks + 1 });
|
||||
}
|
||||
|
||||
public render() {
|
||||
return (
|
||||
<div>
|
||||
<p>You have clicked the button {this.state.clicks} time(s).</p>
|
||||
<p>
|
||||
<button onClick={this.clickHandler}>click me</button>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}</code></pre>
|
Reference in New Issue
Block a user