-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): transformed typography into Text component
- Loading branch information
Showing
38 changed files
with
385 additions
and
1,081 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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,11 @@ | ||
--- | ||
title: Text | ||
description: Displays a text or a component that looks like a text. | ||
component: true | ||
--- | ||
|
||
<ComponentPreview | ||
name="text-demo" | ||
className="[&>div.min-h-[350px]]:p-6" | ||
description="A collection of typographic elements." | ||
/> |
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,12 @@ | ||
{ | ||
"name": "text-demo", | ||
"type": "registry:example", | ||
"files": [ | ||
{ | ||
"path": "examples/text-demo.tsx", | ||
"content": "import { Text } from \"@/registry/default/ui/text\"\n\nexport default function TextDemo() {\n return (\n <div>\n <Text variant=\"h1\">The Joke Tax Chronicles</Text>\n <Text variant=\"p\">\n Once upon a time, in a far-off land, there was a very lazy king who\n spent all day lounging on his throne. One day, his advisors came to him\n with a problem: the kingdom was running out of money.\n </Text>\n <Text variant=\"h2\">The King's Plan</Text>\n <Text>\n The king thought long and hard, and finally came up with{\" \"}\n <Text href=\"#\" variant=\"a\">\n a brilliant plan\n </Text>\n : he would tax the jokes in the kingdom.\n </Text>\n <Text variant=\"blockquote\">\n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair\n that they should pay for the privilege.\"\n </Text>\n <Text variant=\"h3\">The Joke Tax</Text>\n <Text>\n The king's subjects were not amused. They grumbled and complained, but\n the king was firm:\n </Text>\n <Text variant=\"ul\">\n <li>1st level of puns: 5 gold coins</li>\n <li>2nd level of jokes: 10 gold coins</li>\n <li>3rd level of one-liners : 20 gold coins</li>\n </Text>\n <Text>\n As a result, people stopped telling jokes, and the kingdom fell into a\n gloom. But there was one person who refused to let the king's\n foolishness get him down: a court jester named Jokester.\n </Text>\n <Text variant=\"h3\">Jokester's Revolt</Text>\n <Text>\n Jokester began sneaking into the castle in the middle of the night and\n leaving jokes all over the place: under the king's pillow, in his soup,\n even in the royal toilet. The king was furious, but he couldn't seem to\n stop Jokester.\n </Text>\n <Text>\n And then, one day, the people of the kingdom discovered that the jokes\n left by Jokester were so funny that they couldn't help but laugh. And\n once they started laughing, they couldn't stop.\n </Text>\n <Text variant=\"h3\">The People's Rebellion</Text>\n <Text>\n The people of the kingdom, feeling uplifted by the laughter, started to\n tell jokes and puns again, and soon the entire kingdom was in on the\n joke.\n </Text>\n <Text>\n The king, seeing how much happier his subjects were, realized the error\n of his ways and repealed the joke tax. Jokester was declared a hero, and\n the kingdom lived happily ever after.\n </Text>\n <Text>\n The moral of the story is: never underestimate the power of a good laugh\n and always be careful of bad ideas.\n </Text>\n </div>\n )\n}\n", | ||
"type": "registry:example", | ||
"target": "" | ||
} | ||
] | ||
} |
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 @@ | ||
{ | ||
"name": "text-demo", | ||
"type": "registry:example", | ||
"files": [ | ||
{ | ||
"path": "examples/text-demo.tsx", | ||
"content": "import { Text } from \"@/registry/default/ui/text\"\n\nexport default function TextDemo() {\n return (\n <div>\n <Text variant=\"h1\">The Joke Tax Chronicles</Text>\n <Text variant=\"p\">\n Once upon a time, in a far-off land, there was a very lazy king who\n spent all day lounging on his throne. One day, his advisors came to him\n with a problem: the kingdom was running out of money.\n </Text>\n <Text variant=\"h2\">The King's Plan</Text>\n <Text>\n The king thought long and hard, and finally came up with{\" \"}\n <Text href=\"#\" variant=\"a\">\n a brilliant plan\n </Text>\n : he would tax the jokes in the kingdom.\n </Text>\n <Text variant=\"blockquote\">\n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair\n that they should pay for the privilege.\"\n </Text>\n <Text variant=\"h3\">The Joke Tax</Text>\n <Text>\n The king's subjects were not amused. They grumbled and complained, but\n the king was firm:\n </Text>\n <Text variant=\"ul\">\n <li>1st level of puns: 5 gold coins</li>\n <li>2nd level of jokes: 10 gold coins</li>\n <li>3rd level of one-liners : 20 gold coins</li>\n </Text>\n <Text>\n As a result, people stopped telling jokes, and the kingdom fell into a\n gloom. But there was one person who refused to let the king's\n foolishness get him down: a court jester named Jokester.\n </Text>\n <Text variant=\"h3\">Jokester's Revolt</Text>\n <Text>\n Jokester began sneaking into the castle in the middle of the night and\n leaving jokes all over the place: under the king's pillow, in his soup,\n even in the royal toilet. The king was furious, but he couldn't seem to\n stop Jokester.\n </Text>\n <Text>\n And then, one day, the people of the kingdom discovered that the jokes\n left by Jokester were so funny that they couldn't help but laugh. And\n once they started laughing, they couldn't stop.\n </Text>\n <Text variant=\"h3\">The People's Rebellion</Text>\n <Text>\n The people of the kingdom, feeling uplifted by the laughter, started to\n tell jokes and puns again, and soon the entire kingdom was in on the\n joke.\n </Text>\n <Text>\n The king, seeing how much happier his subjects were, realized the error\n of his ways and repealed the joke tax. Jokester was declared a hero, and\n the kingdom lived happily ever after.\n </Text>\n <Text>\n The moral of the story is: never underestimate the power of a good laugh\n and always be careful of bad ideas.\n </Text>\n </div>\n )\n}\n", | ||
"type": "registry:example", | ||
"target": "" | ||
} | ||
] | ||
} |
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,68 @@ | ||
import { Text } from "@/registry/default/ui/text" | ||
|
||
export default function TextDemo() { | ||
return ( | ||
<div> | ||
<Text variant="h1">The Joke Tax Chronicles</Text> | ||
<Text variant="p"> | ||
Once upon a time, in a far-off land, there was a very lazy king who | ||
spent all day lounging on his throne. One day, his advisors came to him | ||
with a problem: the kingdom was running out of money. | ||
</Text> | ||
<Text variant="h2">The King's Plan</Text> | ||
<Text> | ||
The king thought long and hard, and finally came up with{" "} | ||
<Text href="#" variant="a"> | ||
a brilliant plan | ||
</Text> | ||
: he would tax the jokes in the kingdom. | ||
</Text> | ||
<Text variant="blockquote"> | ||
"After all," he said, "everyone enjoys a good joke, so it's only fair | ||
that they should pay for the privilege." | ||
</Text> | ||
<Text variant="h3">The Joke Tax</Text> | ||
<Text> | ||
The king's subjects were not amused. They grumbled and complained, but | ||
the king was firm: | ||
</Text> | ||
<Text variant="ul"> | ||
<li>1st level of puns: 5 gold coins</li> | ||
<li>2nd level of jokes: 10 gold coins</li> | ||
<li>3rd level of one-liners : 20 gold coins</li> | ||
</Text> | ||
<Text> | ||
As a result, people stopped telling jokes, and the kingdom fell into a | ||
gloom. But there was one person who refused to let the king's | ||
foolishness get him down: a court jester named Jokester. | ||
</Text> | ||
<Text variant="h3">Jokester's Revolt</Text> | ||
<Text> | ||
Jokester began sneaking into the castle in the middle of the night and | ||
leaving jokes all over the place: under the king's pillow, in his soup, | ||
even in the royal toilet. The king was furious, but he couldn't seem to | ||
stop Jokester. | ||
</Text> | ||
<Text> | ||
And then, one day, the people of the kingdom discovered that the jokes | ||
left by Jokester were so funny that they couldn't help but laugh. And | ||
once they started laughing, they couldn't stop. | ||
</Text> | ||
<Text variant="h3">The People's Rebellion</Text> | ||
<Text> | ||
The people of the kingdom, feeling uplifted by the laughter, started to | ||
tell jokes and puns again, and soon the entire kingdom was in on the | ||
joke. | ||
</Text> | ||
<Text> | ||
The king, seeing how much happier his subjects were, realized the error | ||
of his ways and repealed the joke tax. Jokester was declared a hero, and | ||
the kingdom lived happily ever after. | ||
</Text> | ||
<Text> | ||
The moral of the story is: never underestimate the power of a good laugh | ||
and always be careful of bad ideas. | ||
</Text> | ||
</div> | ||
) | ||
} |
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.
7 changes: 0 additions & 7 deletions
7
apps/www/registry/default/examples/typography-inline-code.tsx
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.
Oops, something went wrong.