Skip to content

Commit

Permalink
Merge pull request #2 from hedior03/dev
Browse files Browse the repository at this point in the history
Fix preact integration
  • Loading branch information
hedior03 authored Jan 15, 2024
2 parents aba99f4 + 3716b26 commit 246650d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
10 changes: 5 additions & 5 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import { defineConfig } from 'astro/config'

import preact from "@astrojs/preact";
import tailwind from '@astrojs/tailwind'
import preact from '@astrojs/preact'

// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), preact()]
});
integrations: [tailwind(), preact()]
})
1 change: 0 additions & 1 deletion src/components/Navbar.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
import { info } from '@/data/info'
import Sun from './icons/sun.svg.astro'
import Moon from './icons/moon.svg.astro'
Expand Down
8 changes: 6 additions & 2 deletions src/components/details/base/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @jsxImportSource preact */
import { useState, type FC, type PropsWithChildren } from 'preact/compat'

type CopyButtonProps = {
Expand Down Expand Up @@ -27,8 +28,11 @@ const CopyButton: FC<PropsWithChildren<CopyButtonProps>> = ({
}

return (
<div className="group relative">
<button onClick={copyCallback}>{children}</button>
<div class="group relative">
<button onClick={() => console.log('hello')}>try</button>
<button type={'button'} onClick={copyCallback}>
{children}
</button>
<div class="absolute -top-1 left-1/2 flex -translate-x-1/2 -translate-y-full flex-col items-center opacity-0 transition-opacity group-hover:opacity-100">
<div class="rounded-lg bg-hd-grey/10 px-2.5 py-1 backdrop-blur dark:bg-hd-grey/60">
<span class="select-none text-sm font-light">{tooltipText}</span>
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact",
"baseUrl": "/Users/hedior/Developer/personal/portfolio",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
Expand Down

0 comments on commit 246650d

Please sign in to comment.