Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/sxzz/tsdown-templates. Collection of tsdown templates
Something went wrong. Try again.
1234567891011121314151617import { useState } from 'react'
interface MyButtonProps { type?: 'primary'}
export const MyButton: React.FC<MyButtonProps> = ({ type }) => { const [count, setCount] = useState(0) return ( <button className="my-button" onClick={() => setCount(count + 1)}> my button <br /> type: {type} <br /> count: {count} </button> )}