Skip to content

Commit 218523a

Browse files
committed
📃 Card, Input & Textarea docs
1 parent 878ee11 commit 218523a

File tree

9 files changed

+62
-4
lines changed

9 files changed

+62
-4
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
> ⚠️ This guide is old and may not be still relevant! I'll update this soon. 🙏
2+
13
# Contributing to RetroUI
24

35
Thank you for your interest in contributing to RetroUI 🙏. I hope this guide to help you get started.

components/ComponentShowcase.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ interface IComponentShowcase extends HTMLAttributes<HTMLDivElement> {
99
export function ComponentShowcase({ name }: IComponentShowcase) {
1010
const { preview: Preview, codeHtml } = componentConfig.registry[name];
1111
return (
12-
<div>
12+
<div className="space-y-6">
1313
<div>
1414
<H5>Preview</H5>
15-
<div className="border rounded p-6">
15+
<div className="mt-2 border rounded p-6">
1616
<Preview />
1717
</div>
1818
</div>
1919

2020
<div>
2121
<H5>Code</H5>
22-
<div className="border relative rounded p-4 bg-[#222222] text-zinc-200">
22+
<div className="mt-2 border relative rounded p-6 bg-[#222222] text-zinc-200 overflow-auto">
2323
<code>
2424
<pre>{codeHtml}</pre>
2525
</code>

config/components.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const componentConfig = {
5959
},
6060
"button-style-default": {
6161
name: "button-style-default",
62-
preview: lazy(() => import("@/preview/components/badge-style-default")),
62+
preview: lazy(() => import("@/preview/components/button-style-default")),
6363
codeHtml: `<button className="bg-primary-400 text-black px-6 py-2 text-base font-head border-2 border-black shadow-md hover:shadow-xs hover:bg-primary-500 transition-all">
6464
Click Me!
6565
</button>`,
@@ -79,6 +79,15 @@ export const componentConfig = {
7979
type="text"
8080
placeholder="type something..."
8181
className="px-4 py-2 w-full border-2 border-black shadow-md transition focus:outline-none focus:shadow-xs"
82+
/>`,
83+
},
84+
"textarea-style-default": {
85+
name: "textarea-style-default",
86+
preview: lazy(() => import("@/preview/components/textarea-style-default")),
87+
codeHtml: `<textarea
88+
placeholder="Enter text..."
89+
rows="4"
90+
class="px-4 py-2 w-full border-2 border-black shadow-md transition focus:outline-none focus:shadow-xs"
8291
/>`,
8392
},
8493
},

content/docs/components/button.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Default Button
3+
description: This bold button makes sure your users click on it and perform the actions you want! 🚀
4+
lastUpdated: 30 Sep, 2024
5+
---
6+
7+
import {ComponentShowcase} from "@/components"
8+
9+
<ComponentShowcase name="button-style-default" />

content/docs/components/card.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Default Button
3+
description: This bold button makes sure your users click on it and perform the actions you want! 🚀
4+
lastUpdated: 30 Sep, 2024
5+
---
6+
7+
import {ComponentShowcase} from "@/components"
8+
9+
<ComponentShowcase name="card-style-default" />

content/docs/components/input.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Default Button
3+
description: This bold button makes sure your users click on it and perform the actions you want! 🚀
4+
lastUpdated: 30 Sep, 2024
5+
---
6+
7+
import {ComponentShowcase} from "@/components"
8+
9+
<ComponentShowcase name="input-style-default" />

content/docs/components/textarea.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Default Button
3+
description: This bold button makes sure your users click on it and perform the actions you want! 🚀
4+
lastUpdated: 30 Sep, 2024
5+
---
6+
7+
import {ComponentShowcase} from "@/components"
8+
9+
<ComponentShowcase name="textarea-style-default" />

content/docs/components/typography.mdx

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from "react";
2+
3+
export default function TextareaStyleDefault() {
4+
return (
5+
<textarea
6+
rows={4}
7+
placeholder="type something..."
8+
className="px-4 py-2 w-full border-2 border-black shadow-md transition focus:outline-none focus:shadow-xs"
9+
/>
10+
);
11+
}

0 commit comments

Comments
 (0)