From c5abeb7a316a71b7885ad90fc37bf26c80a2d3f1 Mon Sep 17 00:00:00 2001 From: Triston Armstrong Date: Sun, 6 Oct 2024 11:34:59 -0400 Subject: [PATCH] cleanup classnames and add text button --- src/components/cardSelector/CardSelector.tsx | 5 +- src/components/cardSelector/ExportButton.tsx | 3 +- .../cardSelector/ImageCardButton.tsx | 54 +++++++++---------- .../cardSelector/StickyNoteButton.tsx | 36 ++++++------- src/components/cardSelector/TextButton.tsx | 23 ++++++++ src/components/cardSelector/utils.ts | 2 + 6 files changed, 76 insertions(+), 47 deletions(-) create mode 100644 src/components/cardSelector/TextButton.tsx create mode 100644 src/components/cardSelector/utils.ts diff --git a/src/components/cardSelector/CardSelector.tsx b/src/components/cardSelector/CardSelector.tsx index f486059..09ec2b5 100644 --- a/src/components/cardSelector/CardSelector.tsx +++ b/src/components/cardSelector/CardSelector.tsx @@ -2,6 +2,7 @@ import { useRef } from "kaioken" import { StickyNoteButton } from "./StickyNoteButton" import { ImageCardButton } from "./ImageCardButton" import { ExportButton } from "./ExportButton" +import { TextButton } from "./TextButton" export function CardSelector() { const containerRef = useRef(null) @@ -15,7 +16,10 @@ export function CardSelector() { }}> + + + ) @@ -27,7 +31,6 @@ function Divider() { margin: '2px 2px', border: "1px solid #9c9c9c", borderRight: 'none', - borderLeft: 'none', }}> ) } diff --git a/src/components/cardSelector/ExportButton.tsx b/src/components/cardSelector/ExportButton.tsx index 5793506..a48948b 100644 --- a/src/components/cardSelector/ExportButton.tsx +++ b/src/components/cardSelector/ExportButton.tsx @@ -1,4 +1,5 @@ import { ImagesSignal, NotesSigal } from "../../signals" +import { defaultClassName } from "./utils" export function ExportButton() { @@ -35,7 +36,7 @@ export function ExportButton() { stroke-width="2" stroke-linecap="round" stroke-linejoin="round" - className="cursor-pointer w-5 h-5 text-[#9c9c9c] hover:text-blue-500 transition-color duration-300" + className={defaultClassName} > diff --git a/src/components/cardSelector/ImageCardButton.tsx b/src/components/cardSelector/ImageCardButton.tsx index 8e8e035..4643010 100644 --- a/src/components/cardSelector/ImageCardButton.tsx +++ b/src/components/cardSelector/ImageCardButton.tsx @@ -1,6 +1,7 @@ import { ImagesSignal } from "../../signals" import images from "../../signals/images" import { updateLocalStorage } from "../../utils/localStorage" +import { defaultClassName } from "./utils" export function ImageCardButton() { function _handleClick(mouseEvent: MouseEvent) { @@ -47,32 +48,31 @@ export function ImageCardButton() { } return ( - + + + + + ) } diff --git a/src/components/cardSelector/StickyNoteButton.tsx b/src/components/cardSelector/StickyNoteButton.tsx index f342c30..ac302b9 100644 --- a/src/components/cardSelector/StickyNoteButton.tsx +++ b/src/components/cardSelector/StickyNoteButton.tsx @@ -1,6 +1,7 @@ import { NotesSigal } from "../../signals" import notes from "../../signals/notes" import { updateLocalStorage } from "../../utils/localStorage" +import { defaultClassName } from "./utils" export function StickyNoteButton() { function _handleClick(e: MouseEvent) { @@ -21,24 +22,23 @@ export function StickyNoteButton() { } return ( - + + + + ) } diff --git a/src/components/cardSelector/TextButton.tsx b/src/components/cardSelector/TextButton.tsx new file mode 100644 index 0000000..f2dabc4 --- /dev/null +++ b/src/components/cardSelector/TextButton.tsx @@ -0,0 +1,23 @@ +import { defaultClassName } from "./utils"; + +export function TextButton() { + + return ( + + + + + + ) +} diff --git a/src/components/cardSelector/utils.ts b/src/components/cardSelector/utils.ts new file mode 100644 index 0000000..6db4aed --- /dev/null +++ b/src/components/cardSelector/utils.ts @@ -0,0 +1,2 @@ +export const defaultClassName = + "cursor-pointer w-5 h-5 text-[#9c9c9c] hover:text-blue-500 transition-color duration-300"