React Semantic UI中模态和下拉的动画

spj*_*pjy 7 reactjs semantic-ui-react

我最近切换到了React Semantic-UI但是,我发现在语言UI的HTML版本中没有任何动画存在,例如下拉菜单和模态弹出窗口.

我尝试过使用过渡道具并将其包裹在一个模态中,但无济于事.

<Transition animation='scale' duration={500}>
  <Modal
    trigger={<Button>Show Modal</Button>}
    header='Reminder!'
    content='Call Benjamin regarding the reports.'
    actions={[
      'Snooze',
      { key: 'done', content: 'Done', positive: true },
    ]}
  />
</Transition>
Run Code Online (Sandbox Code Playgroud)

有没有办法解决这个问题?

小智 5

在下面的讨论中给出了很多解决方案和示例。我试过<Modal>用 with包裹<TransitionablePortal>它,它有效。看看:https : //github.com/Semantic-Org/Semantic-UI-React/issues/2923

  • 任何类似的下拉解决方案? (2认同)