From 8ac2804674e2f321b51ccf1a390b47bda13c7f39 Mon Sep 17 00:00:00 2001 From: r-freeman Date: Sat, 4 Feb 2023 22:32:01 +0000 Subject: [PATCH] Subscription feature (WIP) --- components/Button.tsx | 2 +- components/Feature.tsx | 28 ++++++++++++++++++++++++++++ components/Resume.tsx | 10 +++------- components/Subscribe.tsx | 25 +++++++++++++++++++++++++ components/icons/MailIcon.tsx | 10 +++++----- 5 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 components/Feature.tsx create mode 100644 components/Subscribe.tsx diff --git a/components/Button.tsx b/components/Button.tsx index 4f43b3e..b503d00 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -10,7 +10,7 @@ type VariantStyles = { type Button = { variant?: string className: string - href: string + href?: string children: ReactNode } diff --git a/components/Feature.tsx b/components/Feature.tsx new file mode 100644 index 0000000..1142452 --- /dev/null +++ b/components/Feature.tsx @@ -0,0 +1,28 @@ +import {ElementType, ReactNode} from 'react' +import {twMerge} from 'tailwind-merge' + +type FeatureProps = { + icon: ElementType + title: String + children: ReactNode + className?: string +} + +export function Feature({icon: Icon, title, children, className}: FeatureProps) { + return ( +
+

+ + {title} +

+ {children} +
+ ) +} \ No newline at end of file diff --git a/components/Resume.tsx b/components/Resume.tsx index 9388ef5..a4249ee 100644 --- a/components/Resume.tsx +++ b/components/Resume.tsx @@ -1,6 +1,7 @@ import {BriefcaseIcon} from '@/components/icons/BriefcaseIcon' import {ArrowDownIcon} from '@/components/icons/ArrowDownIcon' import {Button} from '@/components/Button' +import {Feature} from '@/components/Feature' type Work = { company: string @@ -44,15 +45,10 @@ export function Resume() { ] return ( -
-

- - Work -

+
    {work.map((role, roleIndex) => (
  1. -
    Company
    @@ -86,6 +82,6 @@ export function Resume() { -
+ ) } \ No newline at end of file diff --git a/components/Subscribe.tsx b/components/Subscribe.tsx new file mode 100644 index 0000000..b0cf5cd --- /dev/null +++ b/components/Subscribe.tsx @@ -0,0 +1,25 @@ +import {Feature} from '@/components/Feature' +import {MailIcon} from '@/components/icons/MailIcon' +import {Button} from '@/components/Button' + +export function Subscribe() { + return ( + +

+ Get notified when I publish something new, and unsubscribe at any time. +

+
+ + +
+
+ ) +} \ No newline at end of file diff --git a/components/icons/MailIcon.tsx b/components/icons/MailIcon.tsx index 85db943..d344087 100644 --- a/components/icons/MailIcon.tsx +++ b/components/icons/MailIcon.tsx @@ -2,11 +2,11 @@ import {Props} from '@/types' export function MailIcon(props: Props) { return ( -