Skip to content

Commit

Permalink
Fixes uidotdev#256
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermcginnis committed Nov 4, 2023
1 parent 46b16a1 commit 0f3a2b5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions usehooks.com/src/components/Install.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const { class: className } = Astro.props;

<script>
const copyButton = document.querySelector(`.copy-btn`);

const copyText = `npm i @uidotdev/usehooks`;
const copyText = document.querySelector(`.install code`).textContent;

copyButton.addEventListener("click", async () => {
try {
Expand Down Expand Up @@ -45,7 +44,7 @@ const { class: className } = Astro.props;
display: flex;
justify-content: space-between;
align-items: center;
gap: clamp(.7rem, 3vw, 2rem);
gap: clamp(0.7rem, 3vw, 2rem);
background-color: var(--charcoal);
padding: clamp(1rem, 4vw, 1.3rem) clamp(1rem, 4vw, 1.5rem);
border-radius: 0.5rem;
Expand All @@ -67,7 +66,7 @@ const { class: className } = Astro.props;
.copy-btn {
padding: 0.2rem 0.4rem;
padding-left: 1.7rem;
background: no-repeat url('/img/icon-copy.svg') 0.4rem 50% / .9rem auto;
background: no-repeat url("/img/icon-copy.svg") 0.4rem 50% / 0.9rem auto;
border: var(--border-light);
border-radius: 0.3rem;
font-size: clamp(0.7rem, 2vw, 0.9rem);
Expand Down

0 comments on commit 0f3a2b5

Please sign in to comment.