playbook_ui_docs 14.13.0.pre.rc.0 → 14.13.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88a341c6e6ae51adfb0dec544b38d4bb8c806281a76f92e17058171e30f73e2d
4
- data.tar.gz: 5b4d578bae393381fba64df268915ab03479b603d8d7b3ea96beedabf516dc21
3
+ metadata.gz: 254ed2d5b5569e8816b47e70acd3957323d039b3f0741be15b055b68bc662500
4
+ data.tar.gz: 2ab55bf6279e327a847b8c08a9d87b48e031c7251dfd6ba3ea39b4fa20c603a4
5
5
  SHA512:
6
- metadata.gz: c3273abc90e1edc65827ad1e84b7876702ce0bf1a27509c4d91f7df1ffd569d900eefcdb17f465b5fbe9ad8f792e120f76a842a9262cc13157a4a4611f79e301
7
- data.tar.gz: 0b9b154b6c2f17f849a7178b8f6a683234b12e4f8fa89c253777fc88edbeb1d65b4fef555bfa9369d0fb031eae1486106e9d1585e9a1f9b2adffafa1a9b22986
6
+ metadata.gz: '0783b9110b95471def3cb246c55686817f12da85c7693271443c5c31d964798caacc75782c184811f5829395756db9126c85396f90351d85bf6cf0516923db4f'
7
+ data.tar.gz: c168643aab8a3f341fbe0cf2cc205aa93b91e4c110a697a356173ba92340c6c07246ae01dbb3f319e622546c5ec444d33ff945ad214d15b834690e11044384d8
@@ -0,0 +1,21 @@
1
+ import React from 'react'
2
+ import { CopyButton, Textarea } from 'playbook-ui'
3
+
4
+ const CopyButtonDefault = (props) => (
5
+ <div>
6
+ <CopyButton
7
+ {...props}
8
+ text="Copy Text"
9
+ tooltipPlacement="right"
10
+ tooltipText="Text copied!"
11
+ value="Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease."
12
+ />
13
+
14
+ <Textarea
15
+ {...props}
16
+ placeholder="Copy and paste here"
17
+ />
18
+ </div>
19
+ )
20
+
21
+ export default CopyButtonDefault
@@ -0,0 +1,45 @@
1
+ import React, { useState } from 'react'
2
+ import { CopyButton, Body, TextInput, Textarea } from 'playbook-ui'
3
+
4
+ const CopyButtonFrom = (props) => {
5
+ const [text, setText] = useState("Copy this text input text")
6
+
7
+ const handleChange = (event) => {
8
+ setText(event.target.value);
9
+ }
10
+
11
+ return (<div>
12
+ <Body id="body">Copy this body text!</Body>
13
+ <CopyButton
14
+ {...props}
15
+ from="body"
16
+ marginBottom="sm"
17
+ text="Copy Body text"
18
+ tooltipPlacement="right"
19
+ tooltipText="Body text copied!"
20
+ />
21
+
22
+ <TextInput
23
+ {...props}
24
+ id="textinput"
25
+ onChange={handleChange}
26
+ value={text}
27
+ />
28
+ <CopyButton
29
+ {...props}
30
+ from="textinput"
31
+ marginBottom="sm"
32
+ text="Copy Text Input"
33
+ tooltipPlacement="right"
34
+ tooltipText="Text input copied!"
35
+ />
36
+
37
+ <Textarea
38
+ {...props}
39
+ placeholder="Copy and paste here"
40
+ />
41
+ </div>
42
+ )
43
+ }
44
+
45
+ export default CopyButtonFrom
@@ -0,0 +1 @@
1
+ Provide an element's ID as the `from` parameter, and its text will be copied. If the element is an input, its `value` will be copied; otherwise, the `innerText` will be used. Additionally, if a `value` prop is provided, it will override the content from the `from` element and be copied instead.
@@ -0,0 +1,8 @@
1
+ examples:
2
+
3
+
4
+ react:
5
+ - copy_button_default: Default
6
+ - copy_button_from: Copy From
7
+
8
+
@@ -0,0 +1,2 @@
1
+ export { default as CopyButtonDefault } from './_copy_button_default.jsx'
2
+ export { default as CopyButtonFrom } from './_copy_button_from.jsx'