refactor(SW-1877): a bit of cleanup of code to maintain patterns and separate components and types
This commit is contained in:
@@ -1,15 +1,22 @@
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
import type { PropsWithChildren } from "react"
|
||||
import type { BreadcrumbProps as AriaBreadcrumbProps } from "react-aria-components"
|
||||
|
||||
import type { breadcrumbsVariants } from "./variants"
|
||||
|
||||
export type Breadcrumb = {
|
||||
export type { Breadcrumb, BreadcrumbProps, BreadcrumbsProps }
|
||||
|
||||
type Breadcrumb = {
|
||||
title: string
|
||||
uid: string
|
||||
href?: string
|
||||
}
|
||||
|
||||
export interface BreadcrumbsProps
|
||||
extends VariantProps<typeof breadcrumbsVariants> {
|
||||
subpageTitle?: string
|
||||
interface BreadcrumbsProps extends VariantProps<typeof breadcrumbsVariants> {
|
||||
breadcrumbs: Breadcrumb[]
|
||||
}
|
||||
|
||||
interface BreadcrumbProps extends PropsWithChildren<AriaBreadcrumbProps> {
|
||||
className?: string
|
||||
href?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user