|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<link rel="stylesheet" href="/core/pfe-styles/red-hat-font.min.css"> |
| 4 | +<link rel="stylesheet" href="/core/pfe-core/pfe.min.css"> |
| 5 | +<link rel="stylesheet" href="/core/pfe-styles/pfe-vars.css"> |
| 6 | +<link rel="stylesheet" href="/core/pfe-styles/pfe-base.css"> |
| 7 | +<link rel="stylesheet" href="/core/pfe-styles/pfe-context.css"> |
| 8 | +<link rel="stylesheet" href="/core/pfe-styles/pfe-layouts.css"> |
| 9 | + |
| 10 | +<style> |
| 11 | + h2 { |
| 12 | + margin-top: 20px; |
| 13 | + margin-bottom: 0; |
| 14 | + } |
| 15 | +</style> |
| 16 | + |
| 17 | +<pfe-band color="lightest"> |
| 18 | + <p>This element embeds a copy url button on your site.</p> |
| 19 | + |
| 20 | + <h2>Clipboard</h2> |
| 21 | + <pfe-clipboard role="button" tabindex="0"></pfe-clipboard> |
| 22 | + |
| 23 | + <h2>Clipboard with no icon</h2> |
| 24 | + <pfe-clipboard no-icon role="button" tabindex="0"></pfe-clipboard> |
| 25 | + |
| 26 | + <h2>Clipboard: with custom icon</h2> |
| 27 | + <pfe-clipboard role="button" tabindex="0"> |
| 28 | + <pfe-icon slot="icon" icon="web-icon-globe"></pfe-icon> |
| 29 | + </pfe-clipboard> |
| 30 | + |
| 31 | + <h2>Clipboard: with custom text & copying text from element</h2> |
| 32 | + <pfe-clipboard role="button" tabindex="0" copy-from="#textToCopy"> |
| 33 | + <span slot="label">This will copy the text in the text field below!</span> |
| 34 | + <span slot="success">Making some copies!</span> |
| 35 | + </pfe-clipboard> |
| 36 | + <input type="text" id="textToCopy" value="This text will be copied!!11"></input> |
| 37 | + |
| 38 | + <h2>Clipboard: Copying text from property</h2> |
| 39 | + <pfe-clipboard role="button" tabindex="0" copy-from="property" id="propertyCopy"> |
| 40 | + </pfe-clipboard> |
| 41 | + |
| 42 | + <h2>Clipboard: with custom success text duration.</h2> |
| 43 | + <pfe-clipboard role="button" tabindex="0" copied-duration="5"></pfe-clipboard> |
| 44 | +</pfe-band> |
| 45 | + |
| 46 | +<pfe-band color="darkest"> |
| 47 | + <p>This element embeds a copy url button on your site.</p> |
| 48 | + |
| 49 | + <h2>Clipboard</h2> |
| 50 | + <pfe-clipboard role="button" tabindex="0"></pfe-clipboard> |
| 51 | + |
| 52 | + <h2>Clipboard with no icon</h2> |
| 53 | + <pfe-clipboard no-icon role="button" tabindex="0"></pfe-clipboard> |
| 54 | + |
| 55 | + <h2>Clipboard: with custom icon</h2> |
| 56 | + <pfe-clipboard role="button" tabindex="0"> |
| 57 | + <pfe-icon slot="icon" icon="web-icon-globe"></pfe-icon> |
| 58 | + </pfe-clipboard> |
| 59 | + |
| 60 | + <h2>Clipboard: with custom text</h2> |
| 61 | + <pfe-clipboard role="button" tabindex="0"> |
| 62 | + <span slot="label">You can totally click to copy url</span> |
| 63 | + <span slot="success">Making some copies!</span> |
| 64 | + </pfe-clipboard> |
| 65 | + |
| 66 | + <h2>Clipboard: with custom success text duration.</h2> |
| 67 | + <pfe-clipboard role="button" tabindex="0" copied-duration="5"></pfe-clipboard> |
| 68 | +</pfe-band> |
| 69 | + |
| 70 | +<pfe-band color="accent"> |
| 71 | + <p>This element embeds a copy url button on your site.</p> |
| 72 | + |
| 73 | + <h2>Clipboard</h2> |
| 74 | + <pfe-clipboard role="button" tabindex="0"></pfe-clipboard> |
| 75 | + |
| 76 | + <h2>Clipboard with no icon</h2> |
| 77 | + <pfe-clipboard no-icon role="button" tabindex="0"></pfe-clipboard> |
| 78 | + |
| 79 | + <h2>Clipboard: with custom icon</h2> |
| 80 | + <pfe-clipboard role="button" tabindex="0"> |
| 81 | + <pfe-icon slot="icon" icon="web-icon-globe"></pfe-icon> |
| 82 | + </pfe-clipboard> |
| 83 | + |
| 84 | + <h2>Clipboard: with custom text</h2> |
| 85 | + <pfe-clipboard role="button" tabindex="0"> |
| 86 | + <span slot="label">You can totally click to copy url</span> |
| 87 | + <span slot="success">Making some copies!</span> |
| 88 | + </pfe-clipboard> |
| 89 | + |
| 90 | + <h2>Clipboard: with custom success text duration.</h2> |
| 91 | + <pfe-clipboard role="button" tabindex="0" copied-duration="5"></pfe-clipboard> |
| 92 | +</pfe-band> |
| 93 | + |
| 94 | +<pfe-band color="lightest"> |
| 95 | + <h2>Error cases</h2> |
| 96 | + |
| 97 | + <h3>Set to copy "property", but Property doesn't exist</h3> |
| 98 | + <pfe-clipboard role="button" tabindex="0" copy-from="property"> |
| 99 | + <span slot="label">Oops, I didn't set the property to be copied</span> |
| 100 | + </pfe-clipboard> |
| 101 | + |
| 102 | + <h3>Set to copy a non-existent selector</h3> |
| 103 | + <pfe-clipboard role="button" tabindex="0" copy-from="#wakka-wakka"> |
| 104 | + <span slot="label">Oops, I didn't set a valid selector to be copied</span> |
| 105 | + </pfe-clipboard> |
| 106 | + |
| 107 | +</pfe-band> |
| 108 | + |
| 109 | +<pfe-band color="darkest"> |
| 110 | + <pfe-clipboard role="button" tabindex="0" copy-from="property"> |
| 111 | + <span slot="label">Oops, I didn't set the property to be copied</span> |
| 112 | + </pfe-clipboard> |
| 113 | +</pfe-band> |
0 commit comments