-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(packages/ui):make components dynamic
- Loading branch information
1 parent
48790f5
commit c0d81d0
Showing
25 changed files
with
81 additions
and
106 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,5 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyBlockquote(props: PropsWithChildren) { | ||
return <blockquote className="mt-6 border-l-2 pl-6 italic">{props.children}</blockquote>; | ||
} |
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 { PropsWithChildren } from "react"; | ||
|
||
export function TypographyH1(props: PropsWithChildren) { | ||
return ( | ||
<h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl"> | ||
{props.children} | ||
</h1> | ||
); | ||
} |
6 changes: 4 additions & 2 deletions
6
packages/ui/typography/h2.tsx → packages/ui/components/typography/h2.tsx
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,7 +1,9 @@ | ||
export function TypographyH2() { | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyH2(props: PropsWithChildren) { | ||
return ( | ||
<h2 className="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"> | ||
The People of the Kingdom | ||
{props.children} | ||
</h2> | ||
); | ||
} |
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 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyH3(props: PropsWithChildren) { | ||
return <h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">{props.children}</h3>; | ||
} |
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 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyH4(props: PropsWithChildren) { | ||
return <h4 className="scroll-m-20 text-xl font-semibold tracking-tight">{props.children}</h4>; | ||
} |
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,12 @@ | ||
export * from "./h1"; | ||
export * from "./h2"; | ||
export * from "./h3"; | ||
export * from "./h4"; | ||
export * from "./inline-code"; | ||
export * from "./large"; | ||
export * from "./lead"; | ||
export * from "./list"; | ||
export * from "./muted"; | ||
export * from "./p"; | ||
export * from "./small"; | ||
export * from "./blockquote"; |
6 changes: 4 additions & 2 deletions
6
packages/ui/typography/Inline-code.tsx → .../ui/components/typography/inline-code.tsx
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,7 +1,9 @@ | ||
export function TypographyInlineCode() { | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyInlineCode(props: PropsWithChildren) { | ||
return ( | ||
<code className="bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold"> | ||
@radix-ui/react-alert-dialog | ||
{props.children} | ||
</code> | ||
); | ||
} |
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 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyLarge(props: PropsWithChildren) { | ||
return <div className="text-lg font-semibold">{props.children}</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyLead(props: PropsWithChildren) { | ||
return <p className="text-muted-foreground text-xl">{props.children}</p>; | ||
} |
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,11 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyList(props: PropsWithChildren) { | ||
return ( | ||
<ul className="my-6 ml-6 list-disc [&>li]:mt-2"> | ||
<li>{props.children}</li> | ||
<li>{props.children}</li> | ||
<li>{props.children}</li> | ||
</ul> | ||
); | ||
} |
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 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyMuted(props: PropsWithChildren) { | ||
return <p className="text-muted-foreground text-sm">{props.children}</p>; | ||
} |
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 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographyP(props: PropsWithChildren) { | ||
return <p className="leading-7 [&:not(:first-child)]:mt-6">{props.children}</p>; | ||
} |
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 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
export function TypographySmall(props: PropsWithChildren) { | ||
return <small className="text-sm font-medium leading-none">{props.children}</small>; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.