File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import React , { useState } from 'react' ;
2- import './App.css' ;
1+ import React from 'react' ;
32import Typist from '../src' ;
43import Header from './components/Header' ;
54import Section from './components/Section' ;
65import PauseExample from './components/PauseExample' ;
76
87function App ( ) {
9- const [ count , setCount ] = useState ( 0 ) ;
10- const [ key , setKey ] = useState ( 1 ) ;
11-
128 return (
139 < div className = 'min-h-screen bg-slate-600 px-12 py-10 text-white' >
1410 < Header />
@@ -18,28 +14,17 @@ function App() {
1814 </ Typist >
1915 </ Section >
2016 < PauseExample />
21- < button onClick = { ( ) => setKey ( key + 1 ) } > key</ button >
22- < button onClick = { ( ) => setCount ( count + 1 ) } > { count } </ button >
23- < br />
24- < Typist
25- typingDelay = { 100 }
26- disabled = { count % 2 === 0 }
27- cursor = { < span className = 'cursor' > |</ span > }
28- restartKey = { key }
29- >
30- This is a typo
31- < br />
32- < Typist . Backspace count = { 5 } />
33- < Typist . Delay ms = { 1500 } />
34- react component
35- < Typist . Paste >
36- < div >
37- use
38- < div > deeper div</ div >
39- </ div >
40- </ Typist . Paste >
41- < Typist . Delay ms = { 1500 } />
42- </ Typist >
17+ < Section title = 'Support Delay, Backspacing and Pasting' >
18+ < Typist >
19+ The typing animation can be delayed adn bac
20+ < Typist . Delay ms = { 1000 } />
21+ < Typist . Backspace count = { 6 } />
22+ nd backspaced
23+ < br />
24+ Furthermore,
25+ < Typist . Paste > the text can be pasted directly!</ Typist . Paste >
26+ </ Typist >
27+ </ Section >
4328 </ div >
4429 ) ;
4530}
You can’t perform that action at this time.
0 commit comments