From 6682690a1c8a05bcffc24bcef3c89a14c1762d85 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 26 Mar 2021 21:28:29 +0100 Subject: image and button components --- components/button.tsx | 9 +++++++++ components/image.tsx | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 components/button.tsx create mode 100644 components/image.tsx (limited to 'components') diff --git a/components/button.tsx b/components/button.tsx new file mode 100644 index 0000000..452d85f --- /dev/null +++ b/components/button.tsx @@ -0,0 +1,9 @@ +export default function Button(props: { + text: string; + href?: string; + onclick?: () => void; +}) { + return props.href ? + {props.text} : + +} diff --git a/components/image.tsx b/components/image.tsx new file mode 100644 index 0000000..106c2bd --- /dev/null +++ b/components/image.tsx @@ -0,0 +1,13 @@ +export default function Image(props: { + src: string; + title?: string; +}) { + return
+ {props.title}/ + { + props.title &&
+

{props.title}

+
+ } +
+} -- cgit v1.2.3