-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9152721
commit 3ac5257
Showing
14 changed files
with
182 additions
and
48 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
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,9 @@ | ||
import { GitHubPath } from '@/shared/types/github-path'; | ||
|
||
export const gitHubRepoLink = ({ | ||
owner = 'MarkMelior', | ||
repo = 'simple-app', | ||
path, | ||
}: GitHubPath) => { | ||
return `https://github.com/${owner}/${repo}/blob/master/${path}`; | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { fetchGitHubFileContent } from './fetch-github-file/fetch-github-file'; | ||
import { gitHubRepoLink } from './github-repo-link/github-repo-link'; | ||
import { cn } from './tailwind-merge/tailwind-merge'; | ||
|
||
export { cn, fetchGitHubFileContent }; | ||
export { cn, fetchGitHubFileContent, gitHubRepoLink }; |
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,5 @@ | ||
export interface GitHubPath { | ||
path: string; | ||
owner?: string; | ||
repo?: string; | ||
} |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
.code-block__wrapper { | ||
.linenumber { | ||
@apply text-default-400; | ||
} | ||
} |
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
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,47 @@ | ||
import { BiLogoJavascript, BiLogoTypescript } from 'react-icons/bi'; | ||
import { MdOutlineCookie } from 'react-icons/md'; | ||
import { RiNextjsFill } from 'react-icons/ri'; | ||
import { TbServerBolt } from 'react-icons/tb'; | ||
|
||
export type StackVariants = | ||
| 'TypeScript' | ||
| 'RTK Query' | ||
| 'JavaScript' | ||
| 'Cookie' | ||
| 'Next.js' | ||
| 'SSR'; | ||
|
||
interface ButtonProps { | ||
icon: JSX.Element; | ||
colorText?: string; | ||
color?: string; | ||
} | ||
|
||
export const StackButtonData: Record<StackVariants[number], ButtonProps> = { | ||
TypeScript: { | ||
icon: <BiLogoTypescript size={20} />, | ||
color: 'bg-blue-500/10', | ||
colorText: 'text-blue-500', | ||
}, | ||
JavaScript: { | ||
icon: <BiLogoJavascript size={20} />, | ||
color: 'bg-yellow-500/10', | ||
colorText: 'text-yellow-500', | ||
}, | ||
'RTK Query': { | ||
icon: <></>, | ||
color: 'bg-blue-500/10', | ||
colorText: 'text-blue-500', | ||
}, | ||
Cookie: { | ||
icon: <MdOutlineCookie size={18} />, | ||
color: 'bg-yellow-500/10', | ||
colorText: 'text-yellow-500', | ||
}, | ||
'Next.js': { | ||
icon: <RiNextjsFill size={20} />, | ||
}, | ||
SSR: { | ||
icon: <TbServerBolt size={18} />, | ||
}, | ||
}; |
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,36 @@ | ||
import { cn } from '@/shared/lib'; | ||
import { Button } from '@nextui-org/react'; | ||
import { StackButtonData, StackVariants } from './model/data'; | ||
|
||
interface StackButtonsProps { | ||
tags: StackVariants[]; | ||
isColored?: boolean; | ||
className?: string; | ||
} | ||
|
||
export const StackButtons = ({ | ||
tags, | ||
isColored = true, | ||
className, | ||
}: StackButtonsProps) => { | ||
return ( | ||
<div className={cn('flex gap-2 flex-wrap', className)}> | ||
{tags.map((tag) => ( | ||
<Button | ||
key={tag} | ||
variant='flat' | ||
disableRipple | ||
size='sm' | ||
startContent={StackButtonData[tag]?.icon} | ||
className={`${ | ||
(isColored && StackButtonData[tag]?.color) || 'bg-default-500/10' | ||
} ${ | ||
(isColored && StackButtonData[tag]?.colorText) || 'text-default-700' | ||
} cursor-default`} | ||
> | ||
{tag} | ||
</Button> | ||
))} | ||
</div> | ||
); | ||
}; |
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