Skip to content

Commit

Permalink
Add copy button (#31)
Browse files Browse the repository at this point in the history
Add a copy button and style it
  • Loading branch information
royto authored and ludeeus committed May 25, 2019
1 parent ea36d48 commit 16eb091
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/hacs/frontend/elements/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ async def element_note(self):
</i>
</br>
<pre class="yaml">url: /community_plugin/{element}/{file_name}.js</pre>
<a onclick="navigator.clipboard.writeText('url: /community_plugin/{element}/{file_name}.js')"><i class="fa fa-copy"></i></a>
</br></br>
<i>
To learn more about how to configure this,
Expand Down
3 changes: 3 additions & 0 deletions custom_components/hacs/frontend/elements/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ async def style():
border-style: solid;
border-width: thin;
margin: 0;
overflow: auto;
display: inline-flex;
width: calc(100% - 20px);
}
a {
color: #ffab40;
Expand Down

0 comments on commit 16eb091

Please sign in to comment.