From cae601b0fe048add790fa3b4341d76c973f14b2b Mon Sep 17 00:00:00 2001 From: Matt Kosarek Date: Tue, 28 Apr 2026 19:50:26 -0400 Subject: Publish new blog post + style changes --- src/components/OpenMoji.astro | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/components/OpenMoji.astro (limited to 'src/components/OpenMoji.astro') diff --git a/src/components/OpenMoji.astro b/src/components/OpenMoji.astro new file mode 100644 index 0000000..9fd581d --- /dev/null +++ b/src/components/OpenMoji.astro @@ -0,0 +1,15 @@ +--- +import { readFileSync } from 'fs'; +import { fileURLToPath } from 'url'; +import { join, dirname } from 'path'; + +interface Props { code: string; alt: string; size?: string; } +const { code, alt, size = '1.2em' } = Astro.props; + +const svgPath = join( + dirname(fileURLToPath(import.meta.url)), + `../../node_modules/openmoji/color/svg/${code}.svg` +); +const svg = readFileSync(svgPath, 'utf-8'); +--- + -- cgit v1.2.1