mirror of
https://github.com/penpot/penpot.git
synced 2026-03-06 00:06:07 -05:00
22 lines
526 B
TypeScript
22 lines
526 B
TypeScript
import { useState } from 'react';
|
|
import styles from './Example.module.css';
|
|
|
|
export function Example() {
|
|
const [count, setCount] = useState(0);
|
|
|
|
return (
|
|
<div className={styles.container}>
|
|
<h1>Example!</h1>
|
|
<div>
|
|
<h2>Counter: {count}</h2>
|
|
<button onClick={() => setCount(count + 1)}>Increment</button>
|
|
<button onClick={() => setCount(count - 1)}>Decrement</button>
|
|
<button onClick={() => setCount(0)}>Reset</button>
|
|
</div>
|
|
</div>
|
|
|
|
);
|
|
}
|
|
|
|
export default Example;
|