Skip to content

Commit

Permalink
Update defaultCode.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerZANP committed Jul 8, 2024
1 parent f8f0978 commit 216ed0c
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions packages/shaku-code-annotate-shiki/src/defaultCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,47 @@ public class CommentExample {
javascript: `// @highlight
import { useState } from 'react';
// ( ) (2 ) ( 3 )
export default function Counter() {
// @highlight
const [count, setCount] = useState(0);
//~~~~~~~~
// @diff + start
// This
// is
// Comment
// @diff + end
function handleClick() {
setCount(count + 1);
//-------------------
// ^
//[Underline and callout!]
}
// @class clickable
// @data jser=dev
const blog = "https://jser.dev"
// @diff -
console.log('jser.dev')
// @cut v
// comment to cut
// @cut ^
return (
<button onClick={handleClick}>
{/* ^ */}
{/* [Supports JSX] */}
{/* [Awesome,right?] */}
You pressed me {count} times
</button>
);
}`,
js: `// @highlight
import { useState } from 'react';
// ( ) (2 ) ( 3 )
export default function Counter() {
// @highlight
Expand Down

0 comments on commit 216ed0c

Please sign in to comment.