chore: type reorg
This commit is contained in:
@@ -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({
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user