Skip to content

Commit

Permalink
chore: update nextjs example. #677
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 13, 2024
1 parent 8b091c3 commit ab89f28
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
8 changes: 7 additions & 1 deletion example/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={inter.className}>
<header>
<a href="/">Home</a> |<a href="/merge">Merge</a> |<a href="/textarea">TextArea</a>
<br />
</header>
{children}
</body>
</html>
);
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// import Editor from './_editor';
import { MergeExample } from './_editor/Com';

export default function Merg() {
export default function Merge() {
return (
<div>
<MergeExample />
Expand Down
18 changes: 18 additions & 0 deletions example/nextjs/src/app/textarea/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use client';
import { useState } from 'react';

export default function Merg() {
const [value, setValue] = useState('');
return (
<div>
<textarea
className="text-black"
value={value}
onChange={(e) => {
console.log(e.target.value);
setValue(e.target.value);
}}
/>
</div>
);
}

0 comments on commit ab89f28

Please sign in to comment.