chore: type reorg

This commit is contained in:
Chuma McPhoy
2024-07-12 15:17:11 +02:00
parent f43de03d7a
commit f83f1a66b5
3 changed files with 9 additions and 6 deletions

View File

@@ -3,10 +3,9 @@
import { Children, PropsWithChildren } from "react" import { Children, PropsWithChildren } from "react"
import { CloseIcon } from "@/components/Icons" import { CloseIcon } from "@/components/Icons"
import { SidePeekContentProps } from "@/components/TempDesignSystem/SidePeek/types"
import Title from "@/components/TempDesignSystem/Text/Title" import Title from "@/components/TempDesignSystem/Text/Title"
import { SidePeekContentProps } from "./types"
import styles from "./content.module.css" import styles from "./content.module.css"
export default function Content({ export default function Content({

View File

@@ -3,16 +3,15 @@
import { Children, cloneElement, PropsWithChildren } from "react" import { Children, cloneElement, PropsWithChildren } from "react"
import { Dialog, DialogTrigger, Modal } from "react-aria-components" import { Dialog, DialogTrigger, Modal } from "react-aria-components"
import { SidePeekProps } from "./types"
import styles from "./sidePeek.module.css" import styles from "./sidePeek.module.css"
export default function SidePeek({ export default function SidePeek({
children, children,
onClose, onClose,
activeContent, activeContent,
}: PropsWithChildren<{ }: PropsWithChildren<SidePeekProps>) {
onClose: (isOpen: boolean) => void
activeContent: string | null
}>) {
return ( return (
<DialogTrigger> <DialogTrigger>
<Modal <Modal

View File

@@ -1,3 +1,8 @@
export type SidePeekProps = {
activeContent: string | null
onClose: (isOpen: boolean) => void
}
export type SidePeekContentProps = { export type SidePeekContentProps = {
title?: string title?: string
contentKey: string contentKey: string