Skip to content

Commit

Permalink
Fixed: Scroll fixed and colors copy function changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
moshiur01 committed Oct 24, 2024
1 parent 2114fc0 commit dffdbd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
9 changes: 5 additions & 4 deletions components/content/docs/getting-started/colors/CodeBox.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script lang="ts" setup>
import { useCopy } from "~/hooks/UseCopy";
import { cn } from "~/src/utils/cn";
const { copy, copyToClipboard } = useCopy();
const { copied, copy } = useClipboard({
copiedDuring: 3000,
});
interface CodeBoxProps {
color: string;
Expand All @@ -21,15 +22,15 @@ defineProps<CodeBoxProps>();
color,
)
"
@click="() => copyToClipboard(code)">
@click="() => copy(code)">
<span
:class="
cn(
'opacity-0 transition-all duration-300 group-hover:opacity-100',
id > 300 ? 'text-metal-100' : 'text-metal-900',
)
">
<PhosphorIconCheck v-if="copy" :size="18" />
<PhosphorIconCheck v-if="copied" :size="18" />
<PhosphorIconCopy v-else :size="18" />
</span>
</button>
Expand Down
10 changes: 0 additions & 10 deletions styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
}
html {
-webkit-font-smoothing: antialiased;
@apply scroll-smooth;
}

body {
Expand Down Expand Up @@ -154,15 +153,6 @@ pre::-webkit-scrollbar-thumb {
letter-spacing: -0.3px;
}

/* [vaul-drawer][vaul-drawer-direction="right"]:after {
top: -1px;
bottom: -1px;
}
[vaul-drawer][vaul-drawer-direction="left"]:after {
top: -1px;
bottom: -1px;
} */

[role="listbox"]::-webkit-scrollbar {
@apply w-2.5;
}
Expand Down

0 comments on commit dffdbd8

Please sign in to comment.