DesignPic_20250812152737.tsx 678 B

1234567891011121314151617181920212223242526272829303132333435
  1. import React, { useState } from 'react'
  2. import { Button, Dialog } from '@alifd/next'
  3. export default function DesignPic() {
  4. const [visible, setVisible] = useState(false)
  5. const onOpen = () => {
  6. setVisible(true)
  7. }
  8. const onOk = () => {
  9. setVisible(false)
  10. }
  11. const onClose = () => {
  12. setVisible(false)
  13. }
  14. return (
  15. <div>
  16. <Button onClick={onOpen} type="primary">
  17. Open dialog
  18. </Button>
  19. <Dialog
  20. v2
  21. title="Welcome to Alibaba.com"
  22. visible={visible}
  23. onOk={onOk}
  24. onClose={onClose}
  25. >
  26. <p>Start your business here by searching a popular product</p>
  27. </Dialog>
  28. </div>
  29. )
  30. }