Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(components): transformed typography into Text component #6328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
406 changes: 8 additions & 398 deletions apps/www/__registry__/index.tsx

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions apps/www/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ export const docsConfig: DocsConfig = {
href: "/docs/react-19",
items: [],
},
{
title: "Typography",
href: "/docs/components/typography",
items: [],
},
{
title: "Open in v0",
href: "/docs/v0",
Expand Down Expand Up @@ -372,6 +367,11 @@ export const docsConfig: DocsConfig = {
href: "/docs/components/tabs",
items: [],
},
{
title: "Text",
href: "/docs/components/text",
items: [],
},
{
title: "Textarea",
href: "/docs/components/textarea",
Expand Down
11 changes: 11 additions & 0 deletions apps/www/content/docs/components/text.mdx
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."
/>
63 changes: 0 additions & 63 deletions apps/www/content/docs/components/typography.mdx

This file was deleted.

12 changes: 12 additions & 0 deletions apps/www/public/r/styles/default/text-demo.json
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": ""
}
]
}
12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-blockquote.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-demo.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-h1.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-h2.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-h3.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-h4.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-inline-code.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-large.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-lead.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-list.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-muted.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-p.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-small.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/www/public/r/styles/default/typography-table.json

This file was deleted.

Loading