17 lines
473 B
TypeScript
17 lines
473 B
TypeScript
import React, { useState } from 'react';
|
|
|
|
export const Counter: React.FC = () => {
|
|
const [count, setCount] = useState(0);
|
|
|
|
return (
|
|
<div>
|
|
<div className="bg-red-400 text-3xl font-bold underline">100</div>
|
|
<div className="mt-3 bg-brand-500 text-brand-800">sdsa</div>
|
|
<div className="text-5xl text-green-500">sada</div>
|
|
<button id="counter" type="button" onClick={() => setCount(count + 1)}>
|
|
{count}
|
|
</button>
|
|
</div>
|
|
);
|
|
};
|