diff --git a/src/custom/docs/components/triplecard/index.tsx b/src/custom/docs/components/triplecard/index.tsx index 7ca4a5d..9b35edc 100644 --- a/src/custom/docs/components/triplecard/index.tsx +++ b/src/custom/docs/components/triplecard/index.tsx @@ -1,13 +1,13 @@ -import { Card, CardTitle, CardSubtitle } from './Card' -import NextImage from 'next/image' -import { z } from 'zod' -import { ComponentProps } from 'react' +import { Card, CardTitle, CardSubtitle } from "./Card"; +import NextImage from "next/image"; +import { z } from "zod"; +import { ComponentProps } from "react"; const linkSchema = z.object({ title: z.string(), description: z.string(), link: z.string(), -}) +}); const cardSchema = z.array( z.object({ @@ -17,71 +17,69 @@ const cardSchema = z.array( image_link: z.string(), image_description: z.string(), links: z.array(linkSchema), - })) + }) +); +const regularLink = (props: ComponentProps<"a">) => ; - const regularLink = (props: ComponentProps<'a'>) => - -export const TripleCard = (props: {cards: z.infer, imageComponent: typeof NextImage | typeof regularLink }) => { - +export const TripleCard = (props: { + cards: z.infer; + imageComponent: typeof NextImage | typeof regularLink; +}) => { return ( -
+
{props.cards.map((item, idx, arr) => { return ( { if (idx === 0) { - return 'md:border-b-1 rounded-r-none border-b-none rounded-b md:rounded-bl-xl md:border-r-0' + return "md:border-b-1 rounded-r-none border-b-none rounded-b md:rounded-bl-xl md:border-r-0"; } if (idx === arr.length - 1) { - return 'md:border-b-1 rounded-l-none rounded-t-none border-t-0 md:rounded-tr-xl md:border-t md:border-l-0' + return "md:border-b-1 rounded-l-none rounded-t-none border-t-0 md:rounded-tr-xl md:border-t md:border-l-0"; } - return 'rounded-none border-t-0 md:border-t' + return "rounded-none border-t-0 md:border-t"; })()} > - - + {item.title} {item.subtitle} {item.image_link ? ( -
+
+ />
- ) : ( - null - )} -
-
    + ) : null} +
    +
      {item.links.map((link) => { return (
    • - {link.title} -
      -
      +
      +
      {link.description}
    • - ) + ); })}
    - ) + ); })}
- ) -} + ); +}; diff --git a/src/shadcn/ui/card.tsx b/src/shadcn/ui/card.tsx index 61e5622..b0b9054 100644 --- a/src/shadcn/ui/card.tsx +++ b/src/shadcn/ui/card.tsx @@ -8,7 +8,10 @@ const Card = React.forwardRef< >(({ className, ...props }, ref) => (
)); diff --git a/src/shadcn/ui/switch.tsx b/src/shadcn/ui/switch.tsx index 712cf6b..528a5e9 100644 --- a/src/shadcn/ui/switch.tsx +++ b/src/shadcn/ui/switch.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as SwitchPrimitives from "@radix-ui/react-switch" +import * as React from "react"; +import * as SwitchPrimitives from "@radix-ui/react-switch"; -import { cn } from "src/utils" +import { cn } from "src/utils"; const Switch = React.forwardRef< React.ElementRef, @@ -19,11 +19,11 @@ const Switch = React.forwardRef< > -)) -Switch.displayName = SwitchPrimitives.Root.displayName +)); +Switch.displayName = SwitchPrimitives.Root.displayName; -export { Switch } +export { Switch };