diff options
| author | Kevin Hoerr <kjhoerr@protonmail.com> | 2022-11-28 17:37:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-28 17:37:25 -0500 |
| commit | 832794e035705e7f0a5989ce240a385e5ccebf62 (patch) | |
| tree | ed836a8473688545e93270f25697433e77feba20 /src/components/BlockLink.tsx | |
| parent | 73736f0873017967e78538d42fcfabb60ba8b4a2 (diff) | |
| download | submelon.dev-832794e035705e7f0a5989ce240a385e5ccebf62.tar.gz submelon.dev-832794e035705e7f0a5989ce240a385e5ccebf62.tar.bz2 submelon.dev-832794e035705e7f0a5989ce240a385e5ccebf62.zip | |
Reintegrate GraphQL (#23)
* Use GraphQL for site metadata incl version
* Explicit props for passthrough components
Diffstat (limited to 'src/components/BlockLink.tsx')
| -rw-r--r-- | src/components/BlockLink.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/BlockLink.tsx b/src/components/BlockLink.tsx index f2724e7..c0f2ad6 100644 --- a/src/components/BlockLink.tsx +++ b/src/components/BlockLink.tsx @@ -1,7 +1,12 @@ import React from "react"; -import { BlockAnchor, BlockBody } from "../styles"; +import { ThemedStyledFunction } from "styled-components"; +import { BlockAnchor, BlockBody, Theme } from "../styles"; -const BlockLink = ({ children, ...attributes }) => { +type BlockLinkProps = { + children: React.ReactNode; +} & ThemedStyledFunction<"a", Theme>; + +const BlockLink = ({ children, ...attributes }: BlockLinkProps) => { return ( <BlockBody theme={{ link: true }}> <BlockAnchor {...attributes}>{children}</BlockAnchor> |
