aboutsummaryrefslogtreecommitdiff
path: root/demo.html
diff options
context:
space:
mode:
Diffstat (limited to 'demo.html')
-rw-r--r--demo.html24
1 files changed, 12 insertions, 12 deletions
diff --git a/demo.html b/demo.html
index 2d58fee..39b45bb 100644
--- a/demo.html
+++ b/demo.html
@@ -102,19 +102,19 @@
<section data-auto-animate>
<h2 data-id="code-title">With animations</h2>
- <pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers="|4,8-11|17|22-24">
+ <pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
import React, { useState } from 'react';
function Example() {
const [count, setCount] = useState(0);
return (
- &lt;div&gt;
- &lt;p&gt;You clicked {count} times&lt;/p&gt;
- &lt;button onClick={() =&gt; setCount(count + 1)}&gt;
+ <div>
+ <p>You clicked {count} times</p>
+ <button onClick={() => setCount(count + 1)}>
Click me
- &lt;/button&gt;
- &lt;/div&gt;
+ </button>
+ </div>
);
}
@@ -122,15 +122,15 @@
const [count, setCount] = useState(0);
return (
- &lt;div&gt;
- &lt;p&gt;You clicked {count} times&lt;/p&gt;
- &lt;button onClick={() =&gt; setCount(count + 1)}&gt;
+ <div>
+ <p>You clicked {count} times</p>
+ <button onClick={() => setCount(count + 1)}>
Click me
- &lt;/button&gt;
- &lt;/div&gt;
+ </button>
+ </div>
);
}
- </code></pre>
+ </script></code></pre>
</section>
<section>