UNPKG

@backstage/plugin-techdocs

Version:

The Backstage plugin that renders technical documentation for your components

24 lines (21 loc) 624 B
import { useEffect } from 'react'; import { useEntityList, CATALOG_FILTER_EXISTS } from '@backstage/plugin-catalog-react'; import { TECHDOCS_ANNOTATION } from '@backstage/plugin-techdocs-common'; class TechDocsFilter { getCatalogFilters() { return { [`metadata.annotations.${TECHDOCS_ANNOTATION}`]: CATALOG_FILTER_EXISTS }; } } const TechDocsPicker = () => { const { updateFilters } = useEntityList(); useEffect(() => { updateFilters({ techdocs: new TechDocsFilter() }); }, [updateFilters]); return null; }; export { TechDocsPicker }; //# sourceMappingURL=TechDocsPicker.esm.js.map