import AppButtonModal from '@/components/AppButtonModal'
import { useState } from 'react'

const ModalContent = ({ setOpen }: any) => {
  const [count, setCount] = useState(0)

  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>Click me</button>
      <br />
      <br />
      <button onClick={() => setOpen(false)}>关闭</button>
    </div>
  )
}

export default function Button() {
  return (
    <>
      <AppButtonModal>
        <ModalContent></ModalContent>
      </AppButtonModal>
    </>
  )
}
