-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #737 from mbifulco/feat/more-typescript
Feat/more-typescript
- Loading branch information
Showing
71 changed files
with
2,764 additions
and
2,401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare namespace fathom { | ||
declare function trackGoal(id: string, cents: number); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare function PolitePop(config: any): any; | ||
declare namespace PolitePop { | ||
function onNewEmailSignup(callback: any): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import clsx from 'clsx'; | ||
|
||
type HeadingProps<T extends React.ElementType> = { | ||
as: T; | ||
children: React.ReactNode; | ||
className?: string; | ||
} & React.ComponentPropsWithoutRef<T>; | ||
|
||
export const Heading = <T extends React.ElementType = 'h2'>({ | ||
as, | ||
children, | ||
className, | ||
...props | ||
}: HeadingProps<T>) => { | ||
// Use the 'as' prop to dynamically determine the component type | ||
const Component = as || 'h2'; | ||
|
||
let headingClasses = ''; | ||
switch (Component) { | ||
case 'h1': | ||
headingClasses = 'text-5xl'; | ||
break; | ||
case 'h2': | ||
headingClasses = 'text-4xl'; | ||
break; | ||
case 'h3': | ||
headingClasses = 'text-3xl'; | ||
break; | ||
case 'h4': | ||
headingClasses = 'text-2xl'; | ||
break; | ||
case 'h5': | ||
headingClasses = 'text-xl'; | ||
break; | ||
case 'h6': | ||
headingClasses = 'text-lg'; | ||
break; | ||
default: | ||
headingClasses = 'text-4xl'; | ||
break; | ||
} | ||
|
||
return ( | ||
<Component | ||
{...props} | ||
className={clsx( | ||
'font-bold text-pink-600 hover:text-pink-700 active:text-pink-900', | ||
headingClasses, | ||
className | ||
)} | ||
> | ||
{children} | ||
</Component> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
fcaa88c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mikebifulco-com – ./
mikebifulco-com-git-main-mikebifulco.vercel.app
mikebifulco.com
mikebifulco-com.vercel.app
mikebifulco-com-mikebifulco.vercel.app
www.mikebifulco.com