// Component for {% tx-category %} Markdoc tag. Shows a list (table?) of child pages
// with the matching labels in the frontmatter.
// Requires the index-pages Redocly plugin to get child page data.
import { useThemeHooks } from '@redocly/theme/core/hooks'
import { Link } from '@redocly/theme/components/Link/Link'
import { AmendmentDisclaimer } from './Amendments'
interface TxCategoryProps {
name: string,
}
export function TxCategory(props: TxCategoryProps) {
const { usePageSharedData } = useThemeHooks()
const data = usePageSharedData('index-page-items') as any[]
const matchingItems = data?.filter( (page) => {
if (page.labels && page.labels.includes(props.name)) {
return true
}
return false
})
return (