-
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
ca2cb25
commit 5167072
Showing
6 changed files
with
159 additions
and
99 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { type ReactNode } from 'react'; | ||
|
||
interface HeadingProps { | ||
as?: 'h1' | 'h2' | 'h3'; | ||
children: ReactNode; | ||
} | ||
|
||
export default function Heading({ as = 'h2', children }: HeadingProps) { | ||
const Component = as; | ||
const fontSize = | ||
as === 'h1' ? 'text-5xl' : as === 'h2' ? 'text-2xl' : 'text-lg'; | ||
|
||
return ( | ||
<Component className={`font-bold ${fontSize} mb-2`}> | ||
{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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { type ReactNode } from 'react'; | ||
import { Content } from '@radix-ui/react-tabs'; | ||
|
||
interface TabContentProps { | ||
children: ReactNode; | ||
value: string; | ||
} | ||
|
||
export default function TabContent({ children, value }: TabContentProps) { | ||
return ( | ||
<Content value={value} className="p-4"> | ||
{children} | ||
</Content> | ||
); | ||
} |
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,25 @@ | ||
import { type ReactNode } from 'react'; | ||
import { Trigger } from '@radix-ui/react-tabs'; | ||
|
||
interface TabTriggerProps { | ||
children: ReactNode; | ||
isActive: boolean; | ||
value: string; | ||
} | ||
|
||
export default function TabTrigger({ | ||
children, | ||
isActive, | ||
value | ||
}: TabTriggerProps) { | ||
return ( | ||
<Trigger | ||
value={value} | ||
className={`${ | ||
isActive ? 'bg-green-600' : 'hover:bg-green-800 bg-gray-900' | ||
} px-4 py-2 border-zinc-700 border-t-2 border-r-2 border-l-2 rounded-tl-lg rounded-tr-lg`} | ||
> | ||
{children} | ||
</Trigger> | ||
); | ||
} |
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