File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React , { useState } from 'react' ;
22import './App.css' ;
33import Typist from '../src' ;
4+ import Header from './components/Header' ;
45
56function App ( ) {
67 const [ count , setCount ] = useState ( 0 ) ;
78 const [ key , setKey ] = useState ( 1 ) ;
89
910 return (
10- < div className = "App text-blue-400" >
11+ < div className = 'bg-slate-600 px-12 py-10 text-white ' >
12+ < Header />
1113 < button onClick = { ( ) => setKey ( key + 1 ) } > key</ button >
1214 < button onClick = { ( ) => setCount ( count + 1 ) } > { count } </ button >
1315 < br />
1416 < Typist
1517 typingDelay = { 100 }
1618 disabled = { count % 2 === 0 }
17- cursor = { < span className = " cursor" > |</ span > }
19+ cursor = { < span className = ' cursor' > |</ span > }
1820 restartKey = { key }
1921 >
2022 This is a typo
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+
3+ import Typist from '../../src' ;
4+
5+ export default function Header ( ) {
6+ return (
7+ < div >
8+ < header className = 'text-xl text-cyan-400' >
9+ < h1 className = 'mb-4 text-4xl font-bold' > React Typist Component</ h1 >
10+ < Typist typingDelay = { randomDelayGenerator } >
11+ Use this component to create{ ' ' }
12+ < span className = 'text-red-500' > typewriter effect</ span > easily!
13+ </ Typist >
14+ </ header >
15+ </ div >
16+ ) ;
17+ }
You can’t perform that action at this time.
0 commit comments