diff --git a/src/components/Icon.astro b/src/components/Icon.astro
index 74df665..0a426a3 100644
--- a/src/components/Icon.astro
+++ b/src/components/Icon.astro
@@ -1,7 +1,8 @@
---
+import type { HTMLAttributes } from 'astro/types'
import { optimize } from 'svgo'
-interface Props {
+type Props = HTMLAttributes<'svg'> & {
// `src/assets/icons`にあるSVGのファイル名
name: string
@@ -9,7 +10,7 @@ interface Props {
alt: string
}
-const { name, alt } = Astro.props
+const { name, alt, ...attrs } = Astro.props
const svgContent = (await import(`../assets/icons/${name}.svg?raw`)).default
@@ -31,7 +32,7 @@ const { data: optimizedSvgContent } = optimize(svgContent, {
attribute: {
role: 'img',
'aria-label': alt,
- style: 'width:100%;height:100%',
+ ...attrs,
},
},
},
diff --git a/src/components/button/DiscordJoinLink.astro b/src/components/button/DiscordJoinLink.astro
index d9d932d..63c5f4e 100644
--- a/src/components/button/DiscordJoinLink.astro
+++ b/src/components/button/DiscordJoinLink.astro
@@ -9,9 +9,7 @@ import LinkButton from './LinkButton.astro'
variant="discord"
>
-
-
{x}
))} diff --git a/src/features/layout/components/Footer.astro b/src/features/layout/components/Footer.astro index b40088a..4e70ab8 100644 --- a/src/features/layout/components/Footer.astro +++ b/src/features/layout/components/Footer.astro @@ -5,9 +5,7 @@ import FooterLink from './FooterLink.astro'