playbook_ui_docs 13.34.1.pre.alpha.PLAY14043436 → 13.34.1.pre.alpha.PLAY14633399
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +5 -1
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_dialog/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +1 -1
- data/dist/playbook-doc.js +1 -1
- metadata +2 -3
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx +0 -46
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.34.1.pre.alpha.
|
4
|
+
version: 13.34.1.pre.alpha.PLAY14633399
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-08-
|
12
|
+
date: 2024-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -603,7 +603,6 @@ files:
|
|
603
603
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.html.erb
|
604
604
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx
|
605
605
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.md
|
606
|
-
- app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx
|
607
606
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_props_swift.md
|
608
607
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.html.erb
|
609
608
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react'
|
2
|
-
import { Button, Dialog } from 'playbook-ui'
|
3
|
-
|
4
|
-
const DialogLoading = () => {
|
5
|
-
const [isOpen, setIsOpen] = useState(false)
|
6
|
-
const close = () => {
|
7
|
-
if (!isLoading) {
|
8
|
-
setIsOpen(false)
|
9
|
-
}
|
10
|
-
}
|
11
|
-
const open = () => setIsOpen(true)
|
12
|
-
const [isLoading, setIsLoading] = useState(false)
|
13
|
-
const submit = async () => {
|
14
|
-
setIsLoading(true)
|
15
|
-
|
16
|
-
try {
|
17
|
-
await new Promise((r) => setTimeout(r, 3000))
|
18
|
-
setIsOpen(false)
|
19
|
-
} catch (error) {
|
20
|
-
console.error("An error occurred.")
|
21
|
-
} finally {
|
22
|
-
setIsLoading(false)
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
return (
|
27
|
-
<>
|
28
|
-
<Button onClick={open}>{'Open Dialog'}</Button>
|
29
|
-
<Dialog
|
30
|
-
cancelButton="Cancel"
|
31
|
-
className="wrapper"
|
32
|
-
confirmButton="Okay"
|
33
|
-
loading={isLoading}
|
34
|
-
onCancel={close}
|
35
|
-
onClose={close}
|
36
|
-
onConfirm={submit}
|
37
|
-
opened={isOpen}
|
38
|
-
size="sm"
|
39
|
-
text="Make a 3 second request?"
|
40
|
-
title="Loading Example"
|
41
|
-
/>
|
42
|
-
</>
|
43
|
-
)
|
44
|
-
}
|
45
|
-
|
46
|
-
export default DialogLoading
|