0

我正在尝试从语义-ui-react 库中实现这个基本模式,并希望在单击按钮时显示这个模式。下面是代码:

const ModalModalExample = () => (
  <Modal trigger={<Button>Show Modal</Button>}>
    <Modal.Header>Select a Photo</Modal.Header>
    <Modal.Content image>
    <Image wrapped size='medium' src='/assets/images/avatar/large/rachel.png' />
      <Modal.Description>
        <Header>Default Profile Image</Header>
        <p>We've found the following gravatar image associated with 
        your e-mail address.</p>
        <p>Is it okay to use this photo?</p>
      </Modal.Description>
      </Modal.Content>
  </Modal>
)

我将这个组件导入到另一个 jsx 文件中,我想在其中使用它,但只显示按钮并且它没有任何功能:

<span><ModalModalExample/></span> 
4

0 回答 0