Skip to content

Commit 0f3a2b5

Browse files
committed
Fixes uidotdev#256
1 parent 46b16a1 commit 0f3a2b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

usehooks.com/src/components/Install.astro

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ const { class: className } = Astro.props;
1010

1111
<script>
1212
const copyButton = document.querySelector(`.copy-btn`);
13-
14-
const copyText = `npm i @uidotdev/usehooks`;
13+
const copyText = document.querySelector(`.install code`).textContent;
1514

1615
copyButton.addEventListener("click", async () => {
1716
try {
@@ -45,7 +44,7 @@ const { class: className } = Astro.props;
4544
display: flex;
4645
justify-content: space-between;
4746
align-items: center;
48-
gap: clamp(.7rem, 3vw, 2rem);
47+
gap: clamp(0.7rem, 3vw, 2rem);
4948
background-color: var(--charcoal);
5049
padding: clamp(1rem, 4vw, 1.3rem) clamp(1rem, 4vw, 1.5rem);
5150
border-radius: 0.5rem;
@@ -67,7 +66,7 @@ const { class: className } = Astro.props;
6766
.copy-btn {
6867
padding: 0.2rem 0.4rem;
6968
padding-left: 1.7rem;
70-
background: no-repeat url('/img/icon-copy.svg') 0.4rem 50% / .9rem auto;
69+
background: no-repeat url("/img/icon-copy.svg") 0.4rem 50% / 0.9rem auto;
7170
border: var(--border-light);
7271
border-radius: 0.3rem;
7372
font-size: clamp(0.7rem, 2vw, 0.9rem);

0 commit comments

Comments
 (0)