Skip to content

Commit a6e5824

Browse files
SandipNirmallayershifter
authored andcommitted
docs(Popup): add example for delay prop in Popup (#3754)
* Docs(Popup): Added example to use delay with Popup. Added new example to use show/hide delay with the Popup component. * Update PopupExampleDelay.js
1 parent 07b318a commit a6e5824

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react'
2+
import { Button, Popup } from 'semantic-ui-react'
3+
4+
const PopupExampleDelay = () => (
5+
<Popup
6+
content='Popup will hide in 500ms after leaving mouse.'
7+
mouseEnterDelay={500}
8+
mouseLeaveDelay={500}
9+
on='hover'
10+
trigger={<Button>Open After 500ms</Button>}
11+
/>
12+
)
13+
14+
export default PopupExampleDelay

docs/src/examples/modules/Popup/Usage/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ const PopupUsageExamples = () => (
107107
examplePath='modules/Popup/Usage/PopupExampleDefaultOpen'
108108
renderHtml={false}
109109
/>
110+
<ComponentExample
111+
title='Delay'
112+
description='A popup can have delay in showing and hiding. This avoids accidental popup visibility.'
113+
examplePath='modules/Popup/Usage/PopupExampleDelay'
114+
/>
110115
</ExampleSection>
111116
)
112117

0 commit comments

Comments
 (0)