From 47c1c588bfa9f3493a2d3709297fd62ef34c7f3c Mon Sep 17 00:00:00 2001 From: wil Date: Thu, 28 Mar 2024 21:49:04 -0400 Subject: [PATCH 1/2] common typography --- app/components/H4.tsx | 19 ------------------- app/components/Typography.tsx | 31 +++++++++++++++++++++++++++++++ app/components/index.tsx | 4 ++-- app/routes/ComponentLibrary.tsx | 13 ++++++++++++- 4 files changed, 45 insertions(+), 22 deletions(-) delete mode 100644 app/components/H4.tsx create mode 100644 app/components/Typography.tsx diff --git a/app/components/H4.tsx b/app/components/H4.tsx deleted file mode 100644 index bfbf79d630..0000000000 --- a/app/components/H4.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { twMerge } from "tailwind-merge" - -export const H4 = ({ - className, - children, -}:{ - className?: string, - children: React.ReactNode, -})=>{ - return( -

- {children} -

- ) -} \ No newline at end of file diff --git a/app/components/Typography.tsx b/app/components/Typography.tsx new file mode 100644 index 0000000000..f2c0bda536 --- /dev/null +++ b/app/components/Typography.tsx @@ -0,0 +1,31 @@ +import { twMerge } from "tailwind-merge"; + +interface TypogProps { + className?: string; + children: React.ReactNode; +} +const baseTypo = "text-white"; + +export const H1 = ({className,children,}:TypogProps)=> +

{children}

; + +export const H2 = ({className,children,}:TypogProps)=> +

{children}

; + +export const H3 = ({className,children,}:TypogProps)=> +

{children}

; + +export const H4 = ({className,children,}:TypogProps)=> +

{children}

; + + export const Label = ({className,children,}:TypogProps)=> + ; + +export const H5 = ({className,children,}:TypogProps)=> +
{children}
; + +export const H6 = ({className,children,}:TypogProps)=> +
{children}
; + +export const P = ({className,children,}:TypogProps)=> +

{children}

; \ No newline at end of file diff --git a/app/components/index.tsx b/app/components/index.tsx index 5dabccba07..323db7b12c 100644 --- a/app/components/index.tsx +++ b/app/components/index.tsx @@ -3,7 +3,7 @@ import { ButtonIcon } from "./ButtonIcon"; import { ButtonLink } from "./ButtonLink"; import { ButtonIconSelect } from "./ButtonIconSelect"; import { Input } from "./Input"; -import { H4 } from "./H4"; +import { H1, H2, H3, H4, H5, H6, P, Label} from "./Typography"; import { ItemPicker } from "./ItemPicker"; import { Textarea } from "./Textarea"; import { LoadingBar } from "./LoadingBar"; @@ -14,7 +14,7 @@ export { ButtonIcon, ButtonLink, ButtonIconSelect, - H4, + H1,H2,H3,H4,H5,H6,P,Label, ItemPicker, Textarea, Input, diff --git a/app/routes/ComponentLibrary.tsx b/app/routes/ComponentLibrary.tsx index fd340f82a6..4d10aaa5a7 100644 --- a/app/routes/ComponentLibrary.tsx +++ b/app/routes/ComponentLibrary.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { Button, ButtonLink, - H4, + H1,H2,H3,H4,H5,H6,P,Label, LoadingBar, LoadingDotsTyping, LoadingDotsBricks, @@ -38,6 +38,17 @@ export default function ComponentLibrary () {
+

Typography

+

H1. This is an H1 Heading

+

H2. This is an H2 Heading

+

H3. This is an H3 Heading

+

H4. This is an H4 Heading

+ +

P. Is an normal Paragraph

+
H5. This is an H5 Heading
+
H6. This is an H6 Heading
+ +

Buttons

From 12b7e12f8b05ffa7785f040c5d7d220b722412fb Mon Sep 17 00:00:00 2001 From: wil Date: Fri, 29 Mar 2024 03:17:31 -0400 Subject: [PATCH 2/2] page scrolling --- app/routes/ComponentLibrary.tsx | 134 +++++++++++++++++--------------- 1 file changed, 71 insertions(+), 63 deletions(-) diff --git a/app/routes/ComponentLibrary.tsx b/app/routes/ComponentLibrary.tsx index 4d10aaa5a7..c0e6719021 100644 --- a/app/routes/ComponentLibrary.tsx +++ b/app/routes/ComponentLibrary.tsx @@ -35,76 +35,84 @@ export default function ComponentLibrary () { },[progress]); return( -
+
+
-
-

Typography

-

H1. This is an H1 Heading

-

H2. This is an H2 Heading

-

H3. This is an H3 Heading

-

H4. This is an H4 Heading

- -

P. Is an normal Paragraph

-
H5. This is an H5 Heading
-
H6. This is an H6 Heading
- -
-

Buttons

-
- - - - -
-
- -
-

ButtonLink

- Back to / -
- -
-

Loading Dots

-
-
- -
-
- +
+

Typography

+

H1. This is an H1 Heading

+

H2. This is an H2 Heading

+

H3. This is an H3 Heading

+

H4. This is an H4 Heading

+ +

P. Is an normal Paragraph

+
H5. This is an H5 Heading
+
H6. This is an H6 Heading
+ +
+

Components

+

Buttons

+
+ + + +
-
-
-

Loading Bar

-
+
+

ButtonLink

+ Back to / +
+ +
+

Loading Dots

+
+
+ +
+
+ +
+
+
+ +
+

Loading Bar

+
+ + +
+ + -
- - -
);